Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's to like about a datetime
Message
 
To
23/08/2018 05:08:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
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:
01661732
Views:
71
And why would you use like with DateTime? Just for giggles? :-) Besides being invalid it'd also be much less efficient than using = given that like is a pattern matching operation.

+++ Rick ---


>Out of curiosity, I tried
>
>
select * from mylogins 
>where logintime like '2013-08-06 17:51:18'
>
>and a few other combinations, with % in some places. No error, no result.
>
>Too bad - SQL server throws errors for all kinds of funny reasons, yet this goes by silently. And it could actually be useful for partial date search - when you know only the decade and month, or some other parts of the date. It's silly to use plain strings as date literals in the first place, and then even sillier to never fix the statement parser to not allow this. Yes, the argument to compare with is a string literal, but that doesn't mean that all operators that apply to strings make sense.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform