SELECT C.NROTIMBRADO,P.NROTIMBRADO,* FROM CONCOMPRAS C
INNER JOIN PROVEEDOR P ON C.CODPROVEEDOR = P.CODPROVEEDOR
WHERE C.NROTIMBRADO IS NULL AND FECCOMPROBANTE BETWEEN '01/09/2013' AND '30/09/2013'

SELECT C.NROTIMBRADO,P.NROTIMBRADO,* FROM  COMPRAS C
INNER JOIN PROVEEDOR P ON C.CODPROVEEDOR = P.CODPROVEEDOR
WHERE C.NROTIMBRADO IS NULL AND FECHACOMPRA BETWEEN '01/09/2013' AND '30/09/2013'




UPDATE CONCOMPRAS SET NROTIMBRADO = P.NROTIMBRADO
FROM CONCOMPRAS C
INNER JOIN PROVEEDOR P ON C.CODPROVEEDOR = P.CODPROVEEDOR
WHERE C.NROTIMBRADO IS NULL AND FECCOMPROBANTE BETWEEN '01/09/2013' AND '30/09/2013'


UPDATE  COMPRAS SET NROTIMBRADO = P.NROTIMBRADO
FROM  COMPRAS C
INNER JOIN PROVEEDOR P ON C.CODPROVEEDOR = P.CODPROVEEDOR
WHERE C.NROTIMBRADO IS NULL AND FECHACOMPRA BETWEEN '01/09/2013' AND '30/09/2013'
