Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D65CC9FBBA9 for ; Tue, 24 Apr 2007 09:39:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 32962-04 for ; Tue, 24 Apr 2007 09:39:27 -0300 (ADT) X-Greylist: delayed 00:30:14.564284 by SQLgrey-1.7.4 Received: from gateway.infics.com (gateway.infics.com [202.54.39.20]) by postgresql.org (Postfix) with ESMTP id 567D79FB833 for ; Tue, 24 Apr 2007 09:39:23 -0300 (ADT) X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C78669.5B3E1386" Subject: hi Date: Tue, 24 Apr 2007 17:39:05 +0530 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: hi Thread-Index: AceGaVrXzeAnlAhdTMCVI9c6fYHGqA== From: "Penchalaiah P." To: X-imss-version: 2.046 X-imss-result: Passed X-imss-scanInfo: M:B L:E SM:3 X-imss-tmaseResult: TT:1 TS:-8.0186 TC:1F TRN:63 TV:3.6.1039(15134.003) X-imss-scores: Clean:57.14829 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:3 C:4 M:4 S:4 R:4 (0.5000 0.5000) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/227 X-Sequence-Number: 28227 This is a multi-part message in MIME format. ------_=_NextPart_001_01C78669.5B3E1386 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi=0D I have the data like this in temp table SQL> Select sno, value from temp; SNO Value 1 650.00 2 850.00 3 640.00 3 985.00 5 987.00 9 9864.00 7 875.00 Now, I want display the result like this... SQL> Select sno, value, get_sum(value) as sum from temp; SNO Value SUM 1 650.00 650.00 2 850.00 1500.00 --650+850 3 640.00 2140.00 --1500+640 3 985.00 3125.00 -- 2140+985 5 987.00 4112.00 9 9864.00 13976.00 7 875.00 14851.00 =0D Any one can tell me query for this .. I don't want any procedure or function... =0D =0D Thanks & Regards Penchal Reddy =0D Information transmitted by this e-mail is proprietary to Infinite Computer= Solutions and / or its Customers and is intended for use only by the= individual or the entity to which it is addressed, and may contain= information that is privileged, confidential or exempt from disclosure= under applicable law. If you are not the intended recipient or it appears= that this mail has been forwarded to you without proper authority, you are= notified that any use or dissemination of this information in any manner= is strictly prohibited. In such cases, please notify us immediately at= info.in@infics.com and delete this email from your records. ------_=_NextPart_001_01C78669.5B3E1386 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi

I have the data like this in temp table

SQL> Select sno, value from= temp;

SNO       =             &nb= sp;       Value

1      &nbs= p;             = 650.00

2      &nbs= p;             = 850.00

3      &nbs= p;             = 640.00

3      &nbs= p;             = 985.00

5      &nbs= p;             = 987.00

9      &nbs= p;             = 9864.00

7      &nbs= p;             = 875.00

Now, I want display the result like= this…

SQL> Select sno, value, get_sum(value) as sum from temp;

        SNO            =        Value           &nbs= p;  SUM

1      &nbs= p;              650.00           &nb= sp; 650.00

2      &nbs= p;              850.00           &nb= sp; 1500.00          = --650+850

3      &nbs= p;              640.00           &nb= sp; 2140.00          = --1500+640

3      &nbs= p;              985.00           &nb= sp; 3125.00           --= 2140+985

5      &nbs= p;              987.00           &nb= sp; 4112.00

9      &nbs= p;              9864.00          = 13976.00

7      &nbs= p;              875.00           &nb= sp; 14851.00

 

Any one can tell me query for this= .. I don’t want any procedure or function…

 

 

Thanks &= Regards

Penchal= Reddy

 

Information= transmitted by this e-mail is proprietary to Infinite Computer Solutions= and / or its Customers and is intended for use only by the individual or= the entity to which it is addressed, and may contain information that is= privileged, confidential or exempt from disclosure under applicable law.= If you are not the intended recipient or it appears that this mail has= been forwarded to you without proper authority, you are notified that any= use or dissemination of this information in any manner is strictly= prohibited. In such cases, please notify us immediately at= info.in@infics.com and delete this email from your records.
------_=_NextPart_001_01C78669.5B3E1386--