Ver Mensaje Individual
  #3  
Antiguo 01-01-2011
Avatar de gluglu
[gluglu] gluglu is offline
Miembro Premium
 
Registrado: sep 2004
Ubicación: Málaga - España
Posts: 1.455
Reputación: 21
gluglu Va por buen camino
Si tienes la Fecha y la Hora separadas en dos campos diferentes, no tendrás más remedio que montarte la siguiente consulta :

Código Delphi [-]
Select sum(importe) as sumaa
from lineasdespacho
where (FECHA = :FECHANAC1 and HORA >= :HORA1) or
      (FECHA between :FECHANAC1 + 1 and :FECHANAC2 - 1) or
      (FECHA = :FECHANAC2 and HORA <= :HORA2)

__________________
Piensa siempre en positivo !
Responder Con Cita