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

Easy question - Sum fields in table

Status
Not open for further replies.

crystalfun

Programmer
Feb 8, 2001
39
US
I have an AP table showing all entries in database. If an invoice was charged to 10 different companies I see the invoice number 10 times with 10 different $$ amounts.

What's the command to add up the dollar amounts so that I see one invoice number and one total dollar amount?
 
Try this:

Select inv_nbr, sum(Amt)
from myTable
group by inv_nbr

Hope this helps
 
select invoiceno, sum(amount) from mytable group by invoiceno order by invoiceno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top