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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Week wise trend report

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 below
Name Week1 Week2 till Week8
xxx 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.
Go to Top of Page

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.
Go to Top of Page
   

- Advertisement -