Ver Mensaje Individual
  #6  
Antiguo 22-05-2008
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.738
Reputación: 23
ContraVeneno Va por buen camino
Código Delphi [-]
with Modulo.Busqueda do begin
 If active then close;
 SQL.Clear;
 SQL.Add('SELECT V.id_venta, V.fecha_venta, V.total_venta, P.descripcion,');
 SQL.Add('DV.precio_unitario, DV.cantidad_vendida ');
 SQL.Add('FROM venta V');
 SQL.Add('join Detalle_Venta DV on V.ID_Venta = DV.ID_Venta');
 SQL.Add('join Productos P on DV.Id_Producto = P.ID_Producto');
 SQL.Add('WHERE V.fecha_venta between :FechaIni and :FechaFin');
 SQL.Add('order by V.id_venta');
 ParamByName('Fechaini').AsDateTime := unDateTimePickerIni.DateTime;
 ParamByName('FechaFin').AsDateTime := unDateTimePickerFin.DateTime;
 Open;
end; //with
__________________

Responder Con Cita