View previous topic :: View next topic |
Author |
Message |
coolguy Beginner

Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Tue Aug 04, 2009 7:49 am Post subject: Transpose |
|
|
Hi all
in db2 I want to write a SQL that can take the values from a Table which has multiple rows in it and want to convert them to as multiple columns.
For example the table data from table A is as follows
Input
A
B
C
D
Output should be display as
A B C D
Like this
Could you please help me in this
Thanks
Coolguy |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Aug 04, 2009 12:32 pm Post subject: |
|
|
coolguy,
what happens if you have more than 750 rows? 750 columns is the max you can have per table.
IMHO I think a utility/pgm is best choice for this requirement
Kolusu |
|
Back to top |
|
 |
coolguy Beginner

Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Wed Aug 05, 2009 1:20 am Post subject: |
|
|
Thanks Kolusu
But Number of rowes are limited 50 to 60 it is not going extend more then that, so that i am thinking to use SQL , Please guide me I am in the right Direction
Thanks
Cool |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
coolguy Beginner

Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Thu Aug 06, 2009 5:42 am Post subject: |
|
|
Thanks Kolusu!!! Thanks for Your Time and Help |
|
Back to top |
|
 |
|
|