renee35
MIS
- Jan 30, 2007
- 199
Below is the current code I have summing data based on a month, how can I get it to be broken down by week?
Here is the code:
[Jan] = sum( case when Month( WeekEnding) = 1 then isnull( e.AllTCHours, 0) else 0 end ),
[Feb] = sum( case when Month( WeekEnding) = 2 then isnull( e.AllTCHours, 0) else 0 end ),
[Mar] = sum( case when Month( WeekEnding) = 3 then isnull( e.AllTCHours, 0) else 0 end ),
[Apr] = sum( case when Month( WeekEnding) = 4 then isnull( e.AllTCHours, 0) else 0 end ),
[May] = sum( case when Month( WeekEnding) = 5 then isnull( e.AllTCHours, 0) else 0 end ),
What I am trying to accomplish is to have the data print by Week1, Week2, Week3, etc. as opposed to Jan, Feb, Mar
Any suggestions would be greatley appreciated.
Thanks!!
Thanks a bunch!!
-T
Here is the code:
[Jan] = sum( case when Month( WeekEnding) = 1 then isnull( e.AllTCHours, 0) else 0 end ),
[Feb] = sum( case when Month( WeekEnding) = 2 then isnull( e.AllTCHours, 0) else 0 end ),
[Mar] = sum( case when Month( WeekEnding) = 3 then isnull( e.AllTCHours, 0) else 0 end ),
[Apr] = sum( case when Month( WeekEnding) = 4 then isnull( e.AllTCHours, 0) else 0 end ),
[May] = sum( case when Month( WeekEnding) = 5 then isnull( e.AllTCHours, 0) else 0 end ),
What I am trying to accomplish is to have the data print by Week1, Week2, Week3, etc. as opposed to Jan, Feb, Mar
Any suggestions would be greatley appreciated.
Thanks!!
Thanks a bunch!!
-T