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 |
|
ranalk
Starting Member
49 Posts |
Posted - 2010-06-13 : 11:07:45
|
Hi,I need help on pivoting the following table: Thanks in advance. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-06-13 : 22:20:41
|
[code]select [Subject], [Writing] = isnull([Writing], 0), [Reading] = isnull([Reading], 0)from yourtable t pivot ( sum([occurences]) for [System] in ([Writing], [Reading]) ) p[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
ranalk
Starting Member
49 Posts |
Posted - 2010-06-14 : 10:39:35
|
| Thank you guys ! |
 |
|
|
|
|
|