Ver Mensaje Individual
  #8  
Antiguo 02-08-2012
beteta beteta is offline
Miembro
NULL
 
Registrado: jul 2012
Posts: 19
Reputación: 0
beteta Va por buen camino
Prove y no me funciono me quedo algo asi
Código SQL [-]
var
  Form1: TForm1;elTotal: Double;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
 begin
 Query1.Close;
  Query1.SQL.Text:= 'SELECT SUM(TOTAL) AS TOTAL FROM VENTA WHERE NORDEN = :PORDEN');
  Query1.ParamByName('PORDEN').Value:= StrToInt(Edit1.Text);
  Query1.Open;
  elTotal:= Query1.FieldByName('TOTAL').Value;
  Query1.Close;
  Label1.Caption:= Format('%8.2f',[elTotal]);
Responder Con Cita