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 |
|
mtvaran
Starting Member
1 Post |
Posted - 2010-11-12 : 23:58:54
|
| Hi guys, i have a big problem of creating row as a column.Ex:id | name1 | A2 | B3 | Ci want to change as this...A | B | C1 | 2 | 3i know for you guys, this is not a big issue! could anyone please help me?thank you |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2010-11-14 : 03:06:39
|
| Look up Pivot in Books Online-Chad |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2010-11-15 : 05:12:12
|
| or try like this too select max(case when name = 'A' then id end) as 'A', max(case when name = 'B' then id end) as 'B', max(case when name = 'C' then id end) as 'C'from table name |
 |
|
|
|
|
|