Ver Mensaje Individual
  #5  
Antiguo 02-03-2007
Avatar de jhonny
jhonny jhonny is offline
Jhonny Suárez
 
Registrado: may 2003
Ubicación: Colombia
Posts: 7.070
Reputación: 32
jhonny Va camino a la famajhonny Va camino a la fama
Supongo que deberia ser algo como:

Código Delphi [-]
   ShortDateFormat := 'dd/mm/yyyy';
   ADOQuery1.Active:= False;
   ADOQuery1.SQL.Clear;   
   ADOQuery1.SQL.Add := 'SELECT DISTINCTROW Factura.Fecha, Factura.Terminos,';
   ADOQuery1.SQL.Add := 'Sum(Factura.MntTotal) AS SumaDeMntTotal ';
   ADOQuery1.SQL.Add := 'FROM Factura ';
   ADOQuery1.SQL.Add := 'WHERE Factura.Fecha = :fecha AND Factura.Terminos = "Contado" ';
   ADOQuery1.SQL.Add := 'GROUP BY Factura.Fecha, Factura.Terminos ';
   ADOQuery1.ParamByName('fecha').AsDateTime := DateTimePicker1.Date; //Donde DateTimePicker1. 
                                                      //es un ejemplo de un componente que asumo se llame asi
   ADOQuery1.Active:= True;

Edite: para organizar un poco a ver si se ve mejor.
__________________
Lecciones de mi Madre. Tema: modificación del comportamiento, "Pará de actuar como tu padre!"

http://www.purodelphi.com/
http://www.nosolodelphi.com/

Última edición por jhonny fecha: 02-03-2007 a las 22:22:29.
Responder Con Cita