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 |
|
jung1975
Aged Yak Warrior
503 Posts |
Posted - 2005-08-28 : 20:10:04
|
how can I convert row to column?I have a table looks like:Risk count----- --- High 90Moderate 76Low 129 ,but would like to displayHigh Moderate Low90 76 126 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-29 : 00:48:06
|
| How many rows do you have?If its only 3, then try thisSelect distinctHigh=(Select count from @t where risk='High'),Moderate=(Select count from @t where risk='Moderate'),Low=(Select count from @t where risk='Low')from yourTableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|