mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Merge pull request #1074 from Foundatum/patch-1
Fix Exponential growth in Daily simulation
This commit is contained in:
+2
-1
@@ -39,6 +39,7 @@ BEGIN
|
||||
FROM (SELECT COUNT(*) AS OrderCount FROM Sales.Orders
|
||||
WHERE DATEPART(year,OrderDate) = DATEPART(year,(SELECT MAX(OrderDate) FROM Sales.Orders))
|
||||
AND DATEPART(weekday,OrderDate) NOT IN (1,7)
|
||||
AND BackorderOrderID IS NULL
|
||||
GROUP BY OrderDate) t
|
||||
END
|
||||
ELSE
|
||||
@@ -451,4 +452,4 @@ BEGIN
|
||||
THROW;
|
||||
END CATCH
|
||||
|
||||
END;
|
||||
END;
|
||||
|
||||
Reference in New Issue
Block a user