RE: Running Total
Chris Sol <[email protected]> Thu, 6 Mar 2003 09:38:03 -0000
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-900394-2003.03.06-09.33.13--gcdod-oracle#[email protected]> |
Hi This will do it but you need a table with required number of records in it. select rownum*10100 as result from table where rownum < 5; > -----Original Message----- > From: keyur76 [SMTP:[email protected]] > Sent: 06 March 2003 05:49 > To: Oracle > Subject: [oracle] Running Total > > > > > 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.unsub%%. > **************************************************************************** The Genesis Housing Group - Email Disclaimer -------------------------------------------- The information in this email and any attachments is strictly confidential and may be legally privileged. It is intended solely for the use of the addressee(s) only. Access to this email by anyone else is unauthorised. If you have received this email in error please notify the sender immediately by return email or telephone. Please note that if you are not the intended recipient, you must not copy, distribute or otherwise act on any part of this email or it's attachments. Although we have taken precautions to ensure that this email and attachments are free from any virus, we would advise you that it is your responsibility to ensure that this is true when reading or actioning this email. --- Change your mail options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank email to [email protected].