Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Can one accumulate records in SQL that are NOT in the WHERE clause?
Greetings,
Is it possible to display accumulated values that are NOT in the detail?
I have a table named with 3 current period records, and 5 records from earlier periods. I want to show the 3 records in detail, but also include the 5 records as a ytd summary.
Example: The columns in the Table1 are acct_num, end_date , and count1.
The desired report:
Acct_num End_date Count1 -------- -------- ------ A1234 Period 3 week 1 10 A1234 Period 3 week 2 20 Period total 30 YTD total 500 (if records for periods 1 & 2 totaled470).
Thanks for any insight into this. Received on Tue Mar 26 2002 - 18:01:46 CST