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: Interesting data transposition problem

Re: Interesting data transposition problem

From: <mikharakiri_nospaum_at_yahoo.com>
Date: 10 Jun 2005 14:37:37 -0700
Message-ID: <1118439457.708682.310290@g43g2000cwa.googlegroups.com>


select

     num,
     max(case(when col1='X' then col2 else NULL end),
     max(case(when col1='Y' then col2 else NULL end),
     max(case(when col1='Z' then col2 else NULL end)
from (

   select col1, col2,

          row_number() over (partition by col1 order by col2) num )
group by num Received on Fri Jun 10 2005 - 16:37:37 CDT

Original text of this message

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