Hi All,
I have to pull out a report with the following format from SQL server 2008:
Department1 John Smith $10.00
Matt Doe $20.00
Total 2 $30.00
Department2 Michael Dell $15.00
Total 1 $15.00
Total 3 $45.00
How can I get the subtotal inserted?
Thank you in advance for your time and help.
ellen
Loading
Ellen HuPosted Nov 30, 2010, 10:04 PM
subtotals -- use "Group By Grouping" OR "with Rollout"
To let the department name show only once, I had created a temple table with an auto increased ID, say zMyID. Because it is always easy to identify which rows are having subtotal, then from there can determine the zMyIDs which needs to make the zDepartmentName = ''.
After updating the temple table, I have my expected result.
Thank you for looking my post. Appreciate your time.
ellen