Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's to like about a datetime
Message
De
29/08/2018 19:48:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/08/2018 16:19:17
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
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:
01661772
Vues:
62
>>>DateTimes have always been problematic in searches if you don't treat them as strings. I will add this to that SO link.
>
>FWIW I've been querying DATETIME in SQL Server and Oracle for over 20 years. For datetime fields, initially a different string was assembled for each database matching a cast string value, until we realized that a datetime passed in a parameterized query via ODBC is automatically cast correctly AND uses the index on a datetime field, which casting to string often did not.
>
>My understanding is that datetime gets stored as 2 integers in SQL Server. Certainly it would be interesting to know what an index on that looks like.

I don't think your searches was for exact matches. Otherwise you would know that by now. MS SQL server datetime is only have a sensitivity of 3 milliseconds.

I don't understand what your comment "which casting to string often did not" means at all.
Ç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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform