December 8, 2010 at 5:54 am
Hi,
I need ur kind help on the attached xl.
Thanks,
Rajesh N.
December 8, 2010 at 6:35 am
Try using the ROLLUP operator.
Something like
SELECT
level1,
level2,
level3,
SUM(CalcField1) ,
GROUPING(level1) AS 'IsGrandTotal',
GROUPING(level2) AS 'IsTotal_Level1',
GROUPING(level3) AS 'IsTotal_Level2'
FROM yourTable
GROUP BY level1,level2,level3
WITH ROLLUP
For details please see BOL, section GROUPING "function"
December 8, 2010 at 10:46 am
Thanks Members...I'll check & let u know.
Once again thanks for your help.
regards
raaj
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply