Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/03/2013, 14:06
Avatar de chris225
chris225
 
Fecha de Ingreso: octubre-2012
Ubicación: Medellin
Mensajes: 149
Antigüedad: 11 años, 6 meses
Puntos: 2
Respuesta: consulta para acumular datos

aca tengo la consulta pero no se acumular

select
((BRUTO - (select BRUTO from TRADE where tipodcto in ('NU', 'NB', 'NC') and Codven='43005422' and NRODCTO='610') *
(SELECT (PorcReca/100)FROM GS_Recaudo where (DATEDIFF(day, '2010-03-29','2010-03-29') between Desde and Hasta)) *
(select (PorcReca / 100) from GS_ConfEscal where Nombre='escalafon1'))
),trade.nrodcto,trade.tipodcto,trade.codven,venden .interno
from trade,venden