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!

sum of columns by row

Status
Not open for further replies.

douggy

Technical User
Jan 18, 2001
78
GB
I need to add up the stock quantities by row so my resultant query adds up 49 and 41 (eg the first line of my example) and adds a column containing 90. Can you help?

prd_rcn | prc_stkqty(1)| prc_stkqty(2)

52 49 41
52 26 17
52 20 32
 



Hi,
Code:
Select prd_rcn, prc_stkqty(1), prc_stkqty(2), prc_stkqty+ prc_stkqty(2)


Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I think that would need the square brackets and the missing (1)
Code:
Select prd_rcn, [prc_stkqty(1)], [prc_stkqty(2)], [prc_stkqty(1)]+ [prc_stkqty(2)] as Qty1_2

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top