Running Total

"keyur76" <[email protected]> Thu, 06 Mar 2003 11:19:04 +0530
Newsgroups gmane.comp.db.oracle.devel
Message-ID <LYRIS-1796914-900261-2003.03.06-05.53.17--gcdod-oracle#[email protected]>


I want to have running values of num2 so that display wud be something like this


CREATE TABLE TEST (NUM1 NUMBER(2) , NUM2  NUMBER(3));


INSERT INTO TEST (NUM1,NUM2) VALUES (10,100);
INSERT INTO TEST (NUM1,NUM2) VALUES (20,200);
INSERT INTO TEST (NUM1,NUM2) VALUES (30,300);


NUM Tot
-------------
10 100
20 300
30 600


It is to be achieved using a single SELECT statement.


Thanking u in advance.
Keyur.
Get Your Private, Free E-mail from Indiatimes at  http://email.indiatimes.com
Buy the best in Movies at http://www.videos.indiatimes.com
Bid for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://airsahara.indiatimes.com and Bid Now !


---
Change your mail options at http://p2p.wrox.com/manager.asp or 
to unsubscribe send a blank email to [email protected].