Ver Mensaje Individual
  #4  
Antiguo 20-06-2023
aposi aposi is offline
Miembro
 
Registrado: dic 2006
Posts: 146
Reputación: 18
aposi Va por buen camino
Hola, prueba dos cosas:
Separa el parametro :Primer

Código Delphi [-]
QryBCompro.Sql.Add('Sum(If(MyRenCon.Fecha_Asi>= :Primer and MyRenCon.Fecha_Asi<= :Ultimo,MyRenCon.Debe,0)) as Debe,');
QryBCompro.Sql.Add('Sum(If(MyRenCon.Fecha_Asi>= :Primer and MyRenCon.Fecha_Asi<= :Ultimo,MyRenCon.Haber,0)) as Haber,');


Pasa el parametro como AsDate, no como value
Código Delphi [-]
 QryBCompro.Parameters.ParamByName('Primer').AsDate := Primer; 
 QryBCompro.Parameters.ParamByName('Ultimo').AsDate := Ultimo;
Responder Con Cita