Ver Mensaje Individual
  #6  
Antiguo 09-11-2012
Avatar de pmtzg
pmtzg pmtzg is offline
Miembro
 
Registrado: jul 2007
Posts: 179
Reputación: 17
pmtzg Va por buen camino
Thumbs up

mil gracias por sus aportes
no he probado coalese
pero me funcionoo de esta manera

Código Delphi [-]
(
(select sum(importe) from cuem where trim(no_factura) = trim(facm.cve_doc)) -
(select sum(importe) from cued where trim(no_factura) = trim(facm.cve_doc)) <> 0 
OR
(select sum(importe) from cuem where trim(no_factura) = trim(facm.cve_doc)) -
(select sum(importe) from cued where trim(no_factura) = trim(facm.cve_doc)) is null  
)

saludos
Responder Con Cita