glesser Commented 2 Years ago through
Blogs
I don't have AdventureWorks database to try this on, but I think it would be faster to do the date functions outside of the query. Like this:
<pre><code>
DECLARE @FindDate DATETIME
, @StartDate DATETIME
, @EndDate DATETIME
SET @FindDate = ...