converting record values to column names

Database
Enthusiast

converting record values to column names

Hi all,

could you plz help me with the following query.

1) I have a table A as
Table A
eid dno
1 101
2 102
3 103
4 104

I need to build Table B using Table A.
output (Table B) should be like this
Output
Eid 101 102 103 104
1 Y null null null
2 null Y null null
3 null null Y null
4 null null null Y

The main problem is converting the values of the column "dno" to be displayed as column names.....
plz help me in this regard.

Thanks & Regards,
Venkatesh Gubba
venkatesh.gubba@gmail.com
1 REPLY
Enthusiast

Re: converting record values to column names

See http://forums.teradata.com/forum/analytics/transposing-data