Solved

Column to Rows

Posted on 2011-02-28
2
349 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to count the number of rows in multiple Oracle Tables 10 63
Oracle - Create Procedure with Paramater 16 57
SQL query question 8 40
SQL Developer 6 33
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

867 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

21 Experts available now in Live!

Get 1:1 Help Now