If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to compute partial sums?
I have a bunch of restaurant receipts in a database and I want to sum all
the items of each receipt. Each row of the result set would be a receipt number and a sum of the price of the line items. What might a query like this look like? Is is possible to write a query that would list all the line items grouped by receipt numbers with sub totals for each receipt? Thanks, Siegfried |
#2
|
|||
|
|||
How to compute partial sums?
This would be better done in a report.
-- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "Siegfried Heintze" wrote in message ... I have a bunch of restaurant receipts in a database and I want to sum all the items of each receipt. Each row of the result set would be a receipt number and a sum of the price of the line items. What might a query like this look like? Is is possible to write a query that would list all the line items grouped by receipt numbers with sub totals for each receipt? Thanks, Siegfried |
#3
|
|||
|
|||
How to compute partial sums?
"Roger Carlson" wrote in message ... This would be better done in a report. I assume that means it cannot be done in a single SQL statement but could be done in some custom code or (better yet) crystal reports? Do you have any favorite low $ cost alterantives (open source maybe) to purchasing crystal reports? I suspect I would get quite a few hits if I google searched. Thanks, Siegfried |
#4
|
|||
|
|||
How to compute partial sums?
I don't believe that Roger suggested Crystal. Access comes with a fabulous
report writer. It is simple to use and very powerful. You are attempting to create a "report" so use the correct tool and you won't have any issues. "Siegfried Heintze" wrote in message ... I have a bunch of restaurant receipts in a database and I want to sum all the items of each receipt. Each row of the result set would be a receipt number and a sum of the price of the line items. What might a query like this look like? Is is possible to write a query that would list all the line items grouped by receipt numbers with sub totals for each receipt? Thanks, Siegfried |
#5
|
|||
|
|||
How to compute partial sums?
On Dec 14, 5:01 am, "Siegfried Heintze" wrote:
I have a bunch of restaurant receipts in a database and I want to sum all the items of each receipt. Each row of the result set would be a receipt number and a sum of the price of the line items. What might a query like this look like? If the all query to show all the items of each receipt looks like this: SELECT receipt_number, receipt_item_description, receipt_item_price FROM YourTable; then the query to sum all the items of each receipt might look like this: SELECT receipt_number, SUM(receipt_item_price) AS receipt_items_price_total FROM YourTable GROUP BY receipt_number; Jamie. -- |
#6
|
|||
|
|||
How to compute partial sums?
Personally, I think Access has the best reporting tool around. There has not
been much I have not been able to figure out how to do with assistance from the various Access newsgroups. -- Don''t forget to rate the post if it was helpful! email address is invalid Please reply to newsgroup only. "Siegfried Heintze" wrote: "Roger Carlson" wrote in message ... This would be better done in a report. I assume that means it cannot be done in a single SQL statement but could be done in some custom code or (better yet) crystal reports? Do you have any favorite low $ cost alterantives (open source maybe) to purchasing crystal reports? I suspect I would get quite a few hits if I google searched. Thanks, Siegfried |
Thread Tools | |
Display Modes | |
|
|