View Full Version : Help with simple Access Addition Query


snypa
02-23-2009, 01:04 PM
I want to create a query that will add the values from two rows. The two rows have two attributes that are the same

The table is as follows

ID InvNumber ItemNumber PaymentNo Amount
1 W123 1 1 100
1 W123 2 1 100


I want to add the amounts and the selection criteria to be based on the InvNumber and Payment No. I am using the Access
GUI to write the query and how can I just add the two amounts simply??

Thank you in advance

pbaldy
02-23-2009, 01:13 PM
Try

SELECT InvNumber, PaymentNo, Sum(Amount) AS TotalAmount
FROM TableName
GROUP BY InvNumber, PaymentNo