Reputation: 315
I want to show how many orders have been shipped 10 days before the required date in Access SQL, but I can't seem to get the syntax right.
SELECT COUNT(*)
FROM Orders
WHERE DATEDIFF(day,RequiredDate,ShippedDate)=10;
Upvotes: 0
Views: 36
Reputation: 2072
SELECT Count(*)
FROM Orders
WHERE (((DateDiff("d",[Orders].[RequiredDate],[Orders].[ShippedDate]))=10));
Upvotes: 1