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 |
|
cedlin
Starting Member
7 Posts |
Posted - 2009-12-15 : 00:15:36
|
| I would really appreciate a help... it is pivot table questions with dynamic number of colums but I could not find a good answer anywhere.I got the following table with, say, too columns:Col1 Col2Cona rel1Conb rel1conb rel2conc rel2conb rel3cona rel3I want to get:Col1 Col2 Col3 Col4cona rel1 rel3 conb rel1 rel2 rel3conc rel2 I guess I need to count over the number of 'rel's per 'con' and use the max of it but how? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-15 : 01:38:42
|
| http://sqlblogcasts.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspxMadhivananFailing to plan is Planning to fail |
 |
|
|
cedlin
Starting Member
7 Posts |
Posted - 2009-12-24 : 09:06:20
|
| Thank you, Madhivanan. The link was very helpful. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-24 : 09:14:14
|
quote: Originally posted by cedlin Thank you, Madhivanan. The link was very helpful.
You are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|