Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's to like about a datetime
Message
From
05/09/2018 16:04:13
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
05/09/2018 12:18:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Miscellaneous
Thread ID:
01661714
Message ID:
01661836
Views:
75
>>A LIKE search do benefit from an index on a date\datetime\datetime2\datetimeoffset column.

If you're right re datetime which is what the thread is about, I'm very surprised since datetime is not stored as a string by SQL Server. i understood that LIKE on anything except a string, must involve implicit CAST to string that won't benefit from an index in a different format. But as I said earlier, I don't see how LIKE does anything for datetime you can't do with standard conditions, so I'm happy to leave it there.

>>Mind you, you cannot use BETWEEN queries for datetime range searches in MS SQL server.

So I must by lying that I've been doing it since last century? Along with quite a few others who also describe doing this online? Whatever, Cetin.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform