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 |
pramod21
Yak Posting Veteran
64 Posts |
Posted - 2011-04-21 : 05:52:23
|
Hi,In my query i'm calculating the data(eg:summing the data) weekly wise.suppose in year 2009 in the december month 2nd last week ends at 26 december.that means last week comes in dec 2009 as well as jan 2010,that means it contains data from both the year,becoz week ends at 2 jan 2010.now i want to show entire weeks data in the month jan 2010.is there any function or any way.plz let me know......Thanks. |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-04-21 : 07:33:40
|
Will you be able to use something likeselect sum(yourData)from yourTablewhere youDateCol between dateadd(dd,-6,'20100102') and '20100102' If that wouldn't do it, can you post the code you are currently using? |
 |
|
|
|
|