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

Adding Field Values

Status
Not open for further replies.

foxhound4

IS-IT--Management
Nov 12, 2000
13
0
0
US
I have a tbl that has payments made to my business. These payments can be from the same customer with the same ID. How do I add these payments given that the ID can be the same as well as the payment field name? Ok, I have a tbl with fields: Cust_ID and Amount. Say I have 5 records with Cust_ID.Value = 1, and I want to total the amount fields, how do I accomplish this? If this is way vague or insufficient data please let me know. TIA!!!

--George
 
I tested this and it works if I understand what you want:
Code:
SELECT test.Cust_id, Sum(test.amount) AS SumOfAmount
FROM test
GROUP BY test.id;
Hope this helps...

Terry M. Hoey
th3856@txmail.sbc.com

Ever notice that by the time that you realize that you ran a truncate script on the wrong instance, it is too late to stop it?
 
Adding the values in a table to produce a sum, how do I do it.

I have a table with people listed, every time they submit an order the order form serial number, their name and the value of the order are added to the table.

I want to be able to show a list of each salesman and his total sales for this period.

Tia Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top