Ver Mensaje Individual
  #2  
Antiguo 20-04-2010
Avatar de TOPX
TOPX TOPX is offline
Miembro
 
Registrado: may 2008
Ubicación: Bogotá
Posts: 527
Reputación: 19
TOPX Va camino a la fama
Hola,

Sin haberlo probado y estando medio dormido, se me ocurre que puede intentar:
Código SQL [-]
select total1 - total2
from (
 select sum(campo1) as total1
 from tabla1
  union all
 select sum(campo2) as total2
 from tabla2
)
__________________
"constructive mind, destructive thoughts"
Responder Con Cita