Bases de Datos > Otras Bases de Datos
sumar en dias
Sagma:
gracias por responder, he aplicado lo que has puesto, pero me sale un mensaje: :huh:
1267: The result of a datetime computation is out of range. ;)
fijate esta es la consulta completa:
--- Código: Text --- select sctcdesc, scclccli, scclnomb, scclcanu, sccltele, sccltelx, sccltfax, scdcfnac, (year(today)-year(scdcfnac)), ( select sum(sctfimus) from sctfactu where sctfofic = scclofic and sctfccli = scclccli and sctffdoc >= (extend(today) - 6 units month) and sctffdoc <= (extend(today) + 1 units month) and year(sctffdoc) = year(today)) compra, ( select MAX(sctffdoc) from sctfactu where sctfofic = scclofic and sctfccli = scclccli and year(sctffdoc) = year(today) ) ufecha, scclslcr, ccclicor1 from scmaecli, scdatcli, sctabcon, outer bsoft:cccli where scclofic = scdcofic and scclccli = scdcccli and scdcfnac is not null and month(scdcfnac) = MONTH(today) and sctcgrup = 19 and sctcsubg > 0 and scclubic = sctcgrup*1000+sctcsubg and cccliofic = scclofic and cccliccli = scclccli order by DAY(scdcfnac)
muchas gracias por la orientacion: :rolleyes:
Navegación
[*] Página Anterior
Ir a la versión completa