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

Finding sum of column values in a single row 1

Status
Not open for further replies.

jimoblak

Instructor
Oct 23, 2001
3,620
US
I've got a mental block. If I have a table that looks like this...

id, value1, value2, value3, total
1,1,1,1,[?]
2,2,5,4,[?]
3,4,1,1,[?]

What query could be used to update the value in the 'total' column as the sum of each row's value for 'value1', 'value2', and 'value3'?

The results I am seeking to replace [?] would be:

3
11
6
 
Thanks. That is what I tried as my first query. Had I been intelligent enough to have been connected to the right database at the time, it would have worked then. I've been spinning my wheels on the query for the past 20 minutes. Oy.

[bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top