Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Firebird e Interbase (https://www.clubdelphi.com/foros/forumdisplay.php?f=19)
-   -   problemas al agrupar en interbase (https://www.clubdelphi.com/foros/showthread.php?t=13359)

squenda 16-08-2004 21:55:03

problemas al agrupar en interbase
 
hola a todos, tengo que hacer un concentrado mensual de ingresos por categoria, hice la siguiente sentencia:

select fecha,
(select sum(Pagado) from Historia H2 where H1.fecha = H2.fecha and H2.categoria = 'CONSULTA') as CONSULTAS,
(select sum(Pagado) from Historia H2 where H1.fecha = H2.fecha and H2.categoria = 'HOSPITALIZACION') as HOSPITALIZACION,
(select sum(Pagado) from Historia H2 where H1.fecha = H2.fecha and H2.categoria = 'RX') as RX,
(select sum(Pagado) from Historia H2 where H1.fecha = H2.fecha and H2.categoria = 'OTROS') as otros,
(select sum(Pagado) from Historia H2 where H1.fecha = H2.fecha and H2.categoria = 'PAGO') as pago
from Historia H1
WHERE
H1.Fecha BETWEEN '08/14/2003' AND '08/14/2004'
order by H1.fecha

el query funciona, el problema es que no filtra por rango de fechas, si alguien me pudiera auxiliar, necesito poder filtrar por un rango de fechas.

Gracias

Saludos

roman 16-08-2004 22:32:42

El formato de fecha, 'mm/dd/yyyy' ¿es el adecuado para Interbase?

// Saludos


La franja horaria es GMT +2. Ahora son las 21:17:42.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi