Creating Dynamic columns...

Database
Enthusiast

Creating Dynamic columns...

Say i have data like this

COLUMN A

COLUMN B

A

1

A

2

A

3

A

4

B

1

C

1

C

2

And i want the output to be in the below format...

A

1

2

3

4

B

1

C

1

2

How can i achieve this??

2 REPLIES
Supporter

Re: Creating Dynamic columns...

start searching in the forum

http://forums.teradata.com/forum/database/transpose-rows-to-column#comment-19132

or in

www.teradataforum.com

there are other posts which are dealing with this.

Supporter

Re: Creating Dynamic columns...

P.S. real dynamic - in the meaning that you don't know how much columns will be needed before executing the query would require a dynamic SQL stored procedure...