Solved

Column to Rows

Posted on 2011-02-28
2
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 74

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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ā€¦
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

729 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