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: <puneet.bansal_at_wipro.com>
Date: 9 Jun 2005 16:01:01 -0700
Message-ID: <1118358061.116559.109330@f14g2000cwb.googlegroups.com>


Thanks for the solution. I am using oracle 8i which does not support ANSI syntax full outer join but I managed to get the same result using the following query

select x.x, y.y from (
  select
    rownum r, col2 x
  from
    ttt
  where
    col1 = 'X'
) x,

 (
  select
    rownum r, col2 y
  from
    ttt
  where
    col1 = 'Y'
) y

WHERE
X.R(+) = Y.R

union
select x.x, y.y from (
  select
    rownum r, col2 x
  from
    ttt
  where
    col1 = 'X'
) x,

 (
  select
    rownum r, col2 y
  from
   ttt
  where
    col1 = 'Y'
) y

WHERE
X.R = Y.R(+) Received on Thu Jun 09 2005 - 18:01:01 CDT

Original text of this message

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