Summing text fields?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I frame a query that allows me to sum up the dollars spent with a
particular vendor or PO without repeating the field over and over?
 
Show us examples of your data including the actual column and table names.
Also show how you want the data be returned by the query.
 
Okay, the fields are:

PO Number Vendor Name Item Qty Total


I do an entry for each item purchased, and there are multiple items per
purchase order. I would like the query to total the dollars spent per
purchase order without all the line item details and without repeating the
vendor and PO numbers so that I don't have to do a separate table by PO and
total.
 
SELECT [PO Number], Sum([Total])
FROM YourTable
GROUP BY [PO Number]
ORDER BY [PO Number] ;

SELECT [Vendor Name], Sum([Total])
FROM YourTable
GROUP BY [Vendor Name]
ORDER BY [Vendor Name] ;

SELECT [Vendor Name], [PO Number], Sum([Total])
FROM YourTable
GROUP BY [Vendor Name], [PO Number]
ORDER BY [Vendor Name], [PO Number] ;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top