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 |
jai2808
Starting Member
27 Posts |
Posted - 2009-02-17 : 08:54:02
|
Hi,One of my client is looking for week wise trend report.The report should look like the belowName Week1 Week2 till Week8xxx 5 10 .....Can some one please help me know how we can get this done.Do we need to maintain a table with all week nos and corresponding week start date and enddate.Thanks,Jai |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-17 : 09:02:44
|
nope. what you need is just a datetime field in table. you can group on datepart(wk,datefield) to get week number and find out trend value and then use cross tabbing to get values as columns. |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-17 : 09:06:44
|
Post some sample data and we should be able to help. |
|
|
|
|
|