Home Forums SQL Server 7,2000 T-SQL help with date parameters RE: help with date parameters
ron k
SSCertifiable
Points: 6053
More actions
May 25, 2005 at 12:38 pm
#561068
Using the DATEPART function will not allow the optimizer to use the index on the reortsentdate column so your statement will force a table scan.
For more info on how to work with sql server dates you might want to look at these articles:
http://www.sql-server-performance.com/fk_datetime.asp
http://www.karaszi.com/SQLServer/info_datetime.asp