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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Row Totals

Status
Not open for further replies.

OnLiner

Technical User
Dec 4, 2002
87
US
Greetings,
Couldn't find this in help or search.

I have a qry based on a table with these fields:

001
002
003
004
005
Total

001 through 005 willhave a number amount in them. I'd like the total field to total the sum of the numbers in the fields for each record. So...

HEADERS.....001...002...003...004...005...TTL
1st Record...8.....2.....3.....4.....1.....18

So the total field for each record will give the total sum of those numbers entered in fields 001-005. What do I do to get the total field to do this?

thanks in advance for your help!
 
Oh one more thing, the total field should be able to handle negative numbers. Thanks!
 
I don't see where is the problem.
You wanted something like this (SQL code)?
SELECT [001], [002], [003], [004], [005], ([001] + [002] + [003] + [004] + [005]) AS TTL
FROM yourTable

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top