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 |
|
gad
Starting Member
14 Posts |
Posted - 2006-02-17 : 22:22:21
|
| I have data in the following structure:ID IDName 7DayPeriodStarting Count10 HomeButton 1/2/2006 1507520 HelpButton 1/2/2006 4869930 SearchButton 1/2/2006 12599140 AddButton 1/2/2006 727150 EditButton 1/2/2006 1096960 MemButton 1/2/2006 472070 ProdButton 1/2/2006 3562I'd like to pivot this by grouping on the 7DayPeriodStarting and display the IDName as columns with the corresponding counts per 7Day period. I know I can create multiple sub queries in the Select to do this, but the issue is that I have 250 unique ID names, and I'm wondering if there is a better way to pivot without creating 1 main query and 249 individual subqueries. Thanks for your help! |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
gad
Starting Member
14 Posts |
Posted - 2006-02-19 : 16:15:36
|
| Thanks much for pointing me to existing articles/topics. I shall check those prior to posting next time. Great site. |
 |
|
|
|
|
|