Show Sum [message #311048] |
Thu, 03 April 2008 05:19 |
gozuhair
Messages: 206 Registered: January 2008
|
Senior Member |
|
|
I am using the following query
SELECT empNo,
sal
FROM abc
GROUP BY ROLLUP(sal,empNo);
The above query show the following output.
EMPNO SAL
----- ---------
100 1
1
100 2
2
1000 3
3
My Desired Output is .
EMPNO SAL
----- ---------
100 1
100 2
1000 3
1200
(means 1200 equal to 100+100+1000)
|
|
|
|
Re: Show Sum [message #311064 is a reply to message #311048] |
Thu, 03 April 2008 05:41 |
gozuhair
Messages: 206 Registered: January 2008
|
Senior Member |
|
|
I am using the following query
SELECT empNo,
sal
FROM abc
GROUP BY ROLLUP(sal,empNo);
The above query show the following output.
EMPNO SAL
----- ---------
100 1
1
100 2
2
1000 3
3
My Desired Output is .
EMPNO SAL
----- ---------
100 1
100 2
1000 3
1200
(means 1200 equal to 100+100+1000)
|
|
|
Re: Show Sum [message #311186 is a reply to message #311064] |
Thu, 03 April 2008 11:55 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
gozuhair, being member of the OraFAQ Forum for a several months now, I believe you understand that "Test" forum (the place you chose to put your question in) is NOT supposed to be used for any other purpose that pure testing battlefield.
So, if this is a real question, would you like us to move it to a more appropriate forum? If so, which one would you choose?
Besides, what did you exactly align in your previous post? You did use [code] tags, but - test your skills some more, as 'sal' column isn't aligned at all.
[Updated on: Thu, 03 April 2008 11:56] Report message to a moderator
|
|
|
|
|
|
|