Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select by Date from DateTime in SQL Server
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01653212
Message ID:
01653219
Views:
54
>>>>MartinaJ
>>>
>>>Thank you. Your code is even shorter than mine using DATEADD().
>>
>>Your code should never be used in production as it's non-sargable. Using CAST(dateTimeColun as date)
>>is OK.
>>Or you can use what Michel suggested, it's a proven approach.
>
>non-sargable? En ingles, por favor :)

http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/16/bad-habits-to-kick-mishandling-date-range-queries.aspx
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform