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 |
|
konark
Yak Posting Veteran
60 Posts |
Posted - 2009-01-28 : 14:46:25
|
| I have a weekly and monthly score table. Week_score------------Student_ID week_id month_id Year_id scoreMonth_score ------------ Student_ID month_id Year_id scoreMonth_score is made by aggregating week_score table by using a table 'month_weeks' which containsmonth_id No_of_weeksSuppose today is June 2009. The required output is student_id 2007_score 2008_score Jan_2009 Feb_09 Mar_09 APR_09 MAY_1stweek May_2ndweek May_3rd Week May_4thWeek. Is this possible? Chandragupta Mourya |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-01-28 : 14:47:31
|
| Search for Dynamic pivot in forum. |
 |
|
|
AvanthaSiriwardana
Yak Posting Veteran
78 Posts |
Posted - 2009-01-29 : 01:53:37
|
| you may have to use pivoting in SQL or try to use cube.Avantha Siriwardana |
 |
|
|
|
|
|