Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with dates
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00531688
Message ID:
00534988
Views:
12
The index is a good point.
I'll try creating a second variable with the next day's date.

Thanks guys!

Chris


>DOH!!!! (Bashing head on wall)
>
>Thanks for the heads up!
>
>>Be careful that you don't affect performance. Something like this:
>>
>>WHERE
>> CONVERT(varchar(10), datecolumn, 112) = '20010531'
>>
>>may affect performance bacause SQL Server cannot use an index to solve the query. You might want to try something like:
>>
>>WHERE
>> datecolumn >= '20010531' AND datecolumn < '20010601'
Chris
Previous
Reply
Map
View

Click here to load this message in the networking platform