Smitty
Legend
- Joined
- May 15, 2003
- Messages
- 29,536
I have some data coming from an Oracle database, that I need to recreate in Access. It's much easier to pull the raw data and update the queries there than to have to pull static files from Oracle.
Here's an example:
Excel 2010
I'm trying to get the Category totals, as well as their individual components. I've been reading a bit about Subtotal queries with SQL, but not really wrapping my head around it at this point.
Any suggestions?
Thanks,
Here's an example:
Excel Workbook | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
3 | COMPANY - 701 | |||||||||
4 | LOCATION - TOTAL SMP | |||||||||
5 | CURRENCY - USD | |||||||||
6 | PRODUCT LINE - TOTAL PRODUCT LINE | |||||||||
7 | ACTIVITIES - TOTAL ACTIVITIES | |||||||||
8 | Year 09 | Jan 10 | Feb 10 | Mar 10 | Apr 10 | May 10 | Jun 10 | |||
9 | SALES | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
10 | SALES - PRODUCTS AND SERVICES | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
11 | 35000 SALES-SELLING PRICE REGULAR | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
12 | 35001 SALES-LIQUID PRODUCT | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
13 | 35002 SALES-GAS PRODUCT | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
14 | 35004 SALES-EQUIPMENT | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
34 | FACILITY FEES | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
35 | 35100 SALES-FACILITY FEES | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
36 | OTHER | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
37 | 35201 SALES-INSURANCE CHARGE | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
49 | COST OF SALES | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
50 | COGS GENERAL | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
51 | INVENTORY COSTS | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
52 | 46000 COGS-COST OF GOODS SOLD | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
53 | 46001 COGS-TRANSFER IN COST OF GOODS SOLD | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
54 | 46002 COGS-TRANSFER OUT OF COST OF GOODS SOLD | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
55 | 46003 FABRICATION VARIANCE | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
56 | 46004 COGS-AVERAGE COST VARIANCE | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
57 | 46005 COGS-INVOICE PRICE VARIANCE | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
58 | 46007 COGS-PURCHASE PRICE VARIANCE | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
59 | 46008 COGS-STANDARD COST VARIANCE | .00 | .00 | .00 | .00 | .00 | .00 | .00 | ||
SC |
I'm trying to get the Category totals, as well as their individual components. I've been reading a bit about Subtotal queries with SQL, but not really wrapping my head around it at this point.
Any suggestions?
Thanks,