Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's to like about a datetime
Message
De
23/08/2018 18:36:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/08/2018 05:55:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Divers
Thread ID:
01661714
Message ID:
01661724
Vues:
65
>>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.
>
>Read this, Dragan http://www.varindersandhu.in/2013/02/12/sql-server-like-operator-does-not-work-with-datetime/

Greg,
That blog's author simply doesn't know the like operator and\or datetime.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform