bundling a large database using two fields; by business name and m

R

Rose

I need to to produce a report and send through excel; running the simple
query produces about 117,000 records. I want to sum all records that belong
to a business by month.
How can I ensure that this is done.
 
T

Tom van Stiphout

You want to export to Excel for the purpose of summing by customer and
month?
Access can easily do this using a Totals query. For example:
select CustomerID, Month(InvoiceDate), sum(SalePrice)
from tblInvoices
group by CustomerID, Month(InvoiceDate)

(yes I know this does not handle multiple years; I leave that up to
you)

-Tom.
Microsoft Access MVP
 
K

KARL DEWEY

Try this to include years --
select CustomerID, Year(InvoiceDate), Month(InvoiceDate), sum(SalePrice)
from tblInvoices
group by CustomerID, Year(InvoiceDate), Month(InvoiceDate);
 

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

Top