Solved

Column to Rows

Posted on 2011-02-28
2
347 Views
Last Modified: 2012-08-13
Dears,

i have a table with one column, i want to a query to show this column as rows and columns as below:

      Column1 | Column2|Column3|Column4
Row1      AA               AB          AC          AD
Row2      AE               AF          AG         AH
Row3      AI                BA          BB         BC
Row4 .............................



to make it easier here is the table:

create table TST
(
  X VARCHAR2(10)
);

Values:


insert into tst(x) values ('AA');
insert into tst(x) values ('AB');
insert into tst(x) values ('AC');
insert into tst(x) values ('AD');
insert into tst(x) values ('AE');
insert into tst(x) values ('AF');
insert into tst(x) values ('AG');
insert into tst(x) values ('AH');
insert into tst(x) values ('AI');
insert into tst(x) values ('BA');
insert into tst(x) values ('BB');
insert into tst(x) values ('BC');




thanks all
0
Comment
Question by:Balshe
2 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 34997174
try this...
ee.txt
0
 
LVL 1

Author Comment

by:Balshe
ID: 34997217
Thanks a lot man
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now