supportsvc
Technical User
Hello,
So I found a lot of EXCLUDE weekends, which helped since one report requires NOT to include weekends into the calculation.
However, on other reports weekends need to be INCLUDED but combined in with Monday.
So when it reports on Monday, the Sat. and Sun. figures calculates with Mon. data.
I found this but it doesn't make much sense to me, in fact it doesn't look similar in SQL syntax.
Such as current_date and day
Here's the link. It says it's SQL but I'm such a novice I can't make sense of it.
Running a Mon-Fri report to include weekend data
I tried to change the words to what I am familiar with, however it's insufficient
Or perhaps there's a better way?
So I found a lot of EXCLUDE weekends, which helped since one report requires NOT to include weekends into the calculation.
However, on other reports weekends need to be INCLUDED but combined in with Monday.
So when it reports on Monday, the Sat. and Sun. figures calculates with Mon. data.
I found this but it doesn't make much sense to me, in fact it doesn't look similar in SQL syntax.
Such as current_date and day
Here's the link. It says it's SQL but I'm such a novice I can't make sense of it.
Running a Mon-Fri report to include weekend data
I tried to change the words to what I am familiar with, however it's insufficient
Code:
OrderDate IN (GetDate() – interval
case dayofweek(getdate())
when 1 /* mon */ then 2
when 2 /* tue */ then 1
when 3 /* wed */ then 1
when 4 /* thu */ then 1
when 5 /* fri */ then 1
else null end day,
getdate() – interval
case dayofweek(getdate())
when 2 /* tue */
then 2 else null end day,
getdate() – interval
case dayofweek(current_date)
when 2 /* tue */ then 2 else null end day)
Or perhaps there's a better way?