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 -> Re: Transpose problem...

Re: Transpose problem...

From: nn <nn_at_n.com>
Date: Tue, 23 Jul 2002 12:17:27 +0200
Message-ID: <ahjan3$sp0$1@s1.read.news.oleane.net>


S=(select code,STOP_1 from toto) union (select code,STOP_2 from toto) union (select code,STOP_3 from toto).

if you want order the result :
select * from S order by 1;

"Ste" <stro_at_solari.it> a écrit dans le message news: 3b2044af.0207230157.1253fe0f_at_posting.google.com...
> Hi all,
> I've got this problem. My original table is:
>
> CODE | STOP_1 | STOP_2 | STOP_3
> 001 | ABC | DEF | GHI
> 002 | LMN | OPQ | RST
>
> Where CODE is my primary key.
> I'de like to get a view that gives the result in this form:
>
> CODE | STOPS_LIST |
> 001 | ABC |
> 001 | DEF |
> 001 | GHI |
> 002 | LMN |
> 002 | OPQ |
> 002 | RST |
>
> I've played around DECODE but seems to solve the reversed problem.
> Thanks in advance.
Received on Tue Jul 23 2002 - 05:17:27 CDT

Original text of this message

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