Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Gregory Jackson The Cost of Function Use In A Where Clause RE: The Cost of Function Use In A Where Clause
w.lengenfelder
SSC Eights!
Points: 884
More actions
February 28, 2008 at 4:46 am
#783084
you can also try this
[font="Courier New"]
SELECT *
FROM table_name
WHERE Created_Date BETWEEN
DATEADD(d,DATEDIFF(d,0,@varDate),0)
AND DATEADD(ms, -3,DATEADD(d,DATEDIFF(d,0,@varDate)+1,0))
[/font]