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: Help with select statement (pivot table?)

Re: Help with select statement (pivot table?)

From: <ak_tiredofspam_at_yahoo.com>
Date: 4 May 2005 05:36:08 -0700
Message-ID: <1115210167.973231.177480@o13g2000cwo.googlegroups.com>


use an alias for the rownum from the inline view:

select year, account, rn, sum(decode(rn, 1, Period1, 2, Period2, 3, Period3, 4, Period4, 5, Period5, 6, Period6, 7, Period7, 8,

Period8, 9, Period9, 10, Period10, 11, Period11, 12, Period12)) from table1, (select rownum rn from all_objects where rownum <=12) group by year, account Received on Wed May 04 2005 - 07:36:08 CDT

Original text of this message

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