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

Need to create a Line Count total

Status
Not open for further replies.

danielles

Technical User
Mar 4, 2004
4
CA
I have a large database in which I am trying to make a query that will list a total number of companies (3300 total), and then a line total for the amount of Purchase Orders Paid to them (some have 1-2 and some have 30-40). When I tried to run this I am getting multiple lines per company, where I just want it to show a total number for each company

i.e. XYZ Company - Total PO's 33
NOT - XYZ Company (listed 33 times on separate lines)

I am not sure if this is clear enough. I was told yesterday to try a DCount, but this did not work...please help!!!

Thanks~D
 
SELECT tblCpy.cpy, Sum(tblCpy.po) AS SumOfpo
FROM tblCpy
GROUP BY tblCpy.cpy;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top