Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to sum a recordset..? 1

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,
I retrive records from a SQL database.

What is the best way to sum a recordset?
With rollup? Is there a better way?

/Kent J.
 
Can you use the SQL "SUM" command to some the required recordset field when you populate the recordset. Mise Le Meas,

Mighty :)
 
Mighty,

I would like to see both the details and sum of the details.
Like:
Value
10
20
50
30
Sum 110

/Kent J.



 
I don't know if this is possible but can you do something like:

SELECT ID, VALUE, SUM(VALUE) AS VALUE_SUM FROM mytable Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top