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 -> How can I get sum report as this one?

How can I get sum report as this one?

From: <ilkin.esrefli_at_gmail.com>
Date: 12 May 2006 00:32:44 -0700
Message-ID: <1147419164.706901.314620@u72g2000cwu.googlegroups.com>


Hello!!
I want to get result on Oracle as this one:



NAME PRICE
--------- ------
book        75.00
pen         12.35
notebook     5.05
<total>     92.4

------------------

I know that i may write query as this:
SELECT name, price FROM tbprices
UNION
SELECT 'total', sum(price) FROM tbprices

but it's not good.. I have long query and this method makes long time and do one thing two times..
Is there any short solution about that..?

best Regards...Thanks Received on Fri May 12 2006 - 02:32:44 CDT

Original text of this message

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