Delphi - SUMA DE REGISTROS

 
Vista:

SUMA DE REGISTROS

Publicado por MS (12 intervenciones) el 29/11/2006 10:50:19
SALUDOS HERMANOS
QUIERO SABER ?COMO LE HAGO PARA SUMAR TODOS LOS REGISTROS DE UN CAMPO?

ME REFIERO A QUE TENGO UNA TABLA CON UN CAMPO LLAMADO "PRECIO" EL CUAL YA TIENE VARIOS REGISTROS CON VARIAS CANTIDADES Y QUIERO MOSTRAR LA SUMA DE ESOS REGISTROS MEDIANTE LA INSTRUCCION SHOWMESSAGE...
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:SUMA DE REGISTROS

Publicado por BigLuis (713 intervenciones) el 29/11/2006 17:45:34
Select SUM(campo) from tabla where...............
VariableInt:=Query.fields[0].value
showmessage(inttostr(VariableInt));
Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar