Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jipo
Starting Member
4 Posts |
Posted - 2009-01-17 : 08:40:45
|
Hi, I need some help.I want to make column-header from row value.Ex:select name "x" from tableI want to change the column-header"x" from my another table row valueexample :The column header activity 1 to 3 base on table activity where sch_id from my input. if sch_id=2, the column header after name is only activity4.Is it possible ? How? Thanks |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-01-17 : 08:50:59
|
Are you looking for a cross tab effect where you pivot the rows into columns? If not, what are you trying to accomplish? It's possible using dynamic sql but almost always a bad idea.Be One with the OptimizerTG |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-17 : 08:58:40
|
show some sample data and explain what you want with reqd output |
|
|
jipo
Starting Member
4 Posts |
Posted - 2009-01-17 : 09:16:31
|
added an example |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-01-17 : 11:25:01
|
Search for Dynamic Cross tabs in this forum. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-17 : 11:26:09
|
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/08/27/dynamic-crosstab-with-multiple-pivot-columns.aspx |
|
|
|
|
|