Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Transposing a table !
Here is the problem :
I have the following table tbla :
Prod_no val_1 val_2 val_3 ....
P1 5 15 10 P2 8 6 4
and I would like to get following result :
Prod_no val_no value
P1 1 5 P1 2 15 P1 3 10 P2 1 8 P2 2 6 P2 3 4....
Can anybody help me to find a nice solution avoinding something like
select prod_no,1,val_1 from tbla union select prod_no,2,val_2 from tbla
.....
Thanks in advance Received on Wed May 10 2000 - 00:00:00 CDT
![]() |
![]() |