how i get runing total without formula [message #170093] |
Tue, 02 May 2006 02:05 |
mfa786
Messages: 210 Registered: February 2006 Location: karachi
|
Senior Member |
|
|
hi master
sir can i get runing total without formula
if i use emp table and i need sal column runing total
without formula
which tool or which function i use
please give me idea or if use formula then how i use formula column and placeholder column and where i put both column
thanking you
aamir
|
|
|
Re: how i get runing total without formula [message #170127 is a reply to message #170093] |
Tue, 02 May 2006 04:00 |
orausern
Messages: 826 Registered: December 2005
|
Senior Member |
|
|
Use analytical function like this:
QL> select empno,sal,sum(sal) over (order by empno) from emp;
EMPNO SAL SUM(SAL)OVER(ORDERBYEMPNO)
---------- ---------- --------------------------
7369 800 800
7499 1600 2400
7521 1250 3650
7566 2975 6625
7654 1250 7875
7698 2850 10725
7782 2450 13175
7788 3000 16175
7839 5000 21175
7844 1500 22675
7876 1100 23775
EMPNO SAL SUM(SAL)OVER(ORDERBYEMPNO)
---------- ---------- --------------------------
7900 950 24725
7902 3000 27725
7934 1300 29025
|
|
|
|