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

Home -> Community -> Usenet -> c.d.o.server -> Re: rownum & group by question

Re: rownum & group by question

From: TheSpongebob <gastcom_at_sympatico.ca>
Date: 22 Mar 2006 09:20:50 -0800
Message-ID: <1143048050.104342.222870@j33g2000cwa.googlegroups.com>


yippe ... I ended up adding the rownumber to my inline table. this allowed me to take it out of the group-by. THEN, I pivoted.

select 1,

        sum(case b.pos when 1 then b.amt end) amt,
        sum(case b.pos when 2 then b.amt end) amt2
from

    (
    select rownum as pos, a.* from <----

        (

...
...

before-mentioned query Received on Wed Mar 22 2006 - 11:20:50 CST

Original text of this message

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