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

Home -> Community -> Usenet -> c.d.o.misc -> Q: Queries combinig...

Q: Queries combinig...

From: <evlap_at_usa.net>
Date: 1998/12/29
Message-ID: <76b421$uqq$1@nnrp1.dejanews.com>#1/1

Hi All!
There are two queries
1) SELECT SUM (Field1) FROM Otch WHERE TRUNC (AuctionDate, 'dd')=TO_DATE ('24/12/98', 'dd/mm/yy');
its result is stored into variable FullAmount 2) SELECT Field1, Field*100/:FullAmount "Percent" FROM Otch WHERE TRUNC (AuctionDate, 'dd')=TO_DATE ('24/12/98', 'dd/mm/yy'); i.e. % of full amount is calculated in the second column. Q: is it possible to combine these two queris into one (I want to avoid using 2 queries)? It's nessary for me because I wanna insert this query in my Excel table.

Thanks in advance.

Regards, Eugene.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Dec 29 1998 - 00:00:00 CST

Original text of this message

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