You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
Somewhere around line 2450 a WHERE-clause is built to only include results for working-days (Mondays to Fridays).
If @df = 7 (first day of week is Sunday) the WEEKDAY-range must be between 2 and 6, which is correct.
However, if @df = 1 (first day of week is Monday) the WEEKDAY-range should be between 1 and 5, but sp_QuickieStore takes the range between 1 and 6. This way, the queries from Saturday would also be included, which is not right:
IF @df = 1
BEGIN
SELECT
@where_clause += N'AND DATEPART(WEEKDAY, qsrs.last_execution_time) BETWEEN 1 AND 6' + @nc10; <----- 6 should be 5
END;/*df 1*/
IF @df = 7
BEGIN
SELECT
@where_clause += N'AND DATEPART(WEEKDAY, qsrs.last_execution_time) BETWEEN 2 AND 6' + @nc10;
END;/*df 7*/
The text was updated successfully, but these errors were encountered:
Version of the script
What is the current behavior?
Somewhere around line 2450 a WHERE-clause is built to only include results for working-days (Mondays to Fridays).
If @df = 7 (first day of week is Sunday) the WEEKDAY-range must be between 2 and 6, which is correct.
However, if @df = 1 (first day of week is Monday) the WEEKDAY-range should be between 1 and 5, but sp_QuickieStore takes the range between 1 and 6. This way, the queries from Saturday would also be included, which is not right:
The text was updated successfully, but these errors were encountered: