Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> SQL Query

SQL Query

From: <RShankar1_at_CHN.COGNIZANT.COM>
Date: Wed, 13 Mar 2002 01:23:30 -0800
Message-ID: <F001.00426ACF.20020313012330@fatcity.com>


Hi Friends,

    I just need a help in a SQL statement. There is a test table with one number field say X.
I needed a sql statement which will show the value of x for each row and the sum of all X.
For ex , if 3 rows are there with values 3,6,9 then the output should be  

X Sum(X)



3 18
6 18
9 18 .  

I am using oracle version 8.0.4 where i am not able to execute the sql statement

    select x, (select sum(x) from test) from test which is showing error as missing expression .  

Thanks in advance.  

Regards,
Shankar

-----Original Message-----
Sent: Wednesday, March 13, 2002 1:58 PM
To: Multiple recipients of list ORACLE-L

I use Tim Onion's site which has a comprehensive listing of basic DBA scripts and there is also a zip file to download the lot in one go.

www.timonions.com

John

-----Original Message-----
<mailto:david.m.nguyen_at_xo.com> ]

Sent: 12 March 2002 22:54
To: Multiple recipients of list ORACLE-L

I try to find some scripts (PL/SQL package) to monitor my oracle database such as tablespace, rollback segment, etc. Does someone know a website that

has this?

Thanks,
David

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com

<http://www.orafaq.com>
-- Author: Nguyen, David M INET: david.m.nguyen_at_xo.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ========================================================= This electronic message contains information from the mmO2 plc Group which may be privileged or confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or email (to the numbers or address above) immediately. =========================================================

-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: RShankar1_at_CHN.COGNIZANT.COM Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

Received on Wed Mar 13 2002 - 03:23:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US