Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's to like about a datetime
Message
From
07/09/2018 08:32:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/09/2018 15:07:11
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
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:
01661869
Views:
50
>If you know how, why not answer rather than suggesting other people haven't read the thread or are getting confused with VFP tables?

You could simply create an index on a datetime field and then check the execution plans to observe that the index is used. I didn't think that you didn't know this, sorry.


>>> I have demonstrated that a zillion times here and elsewhere. With BETWEEN range boundaries are INCLUSIVE and with MS SQL server datetimes there is no way to create an INCLUSIVE upper bound.
>
>In my very first response I showed how easily this is managed if you use parameters. E.g. in VFP:
>
>
>ltUpperLimit=dtot(date()+1)-1
>? m.ltUpperLimit
>
>
>Voila, an inclusive upper parameter for today's date. As Dragan notes, you might want to add the rest of the ticks stored in SQL Server's second integer for datetime- but I know they're never used in my data and there's value in standard parameterized SQL that works the same against SQL Server, Oracle or other databases.

Voila? Voila for what? Wouldn't that create an upper limit inclusive for today's date but EXCLUSIVE today's last second? What am I missing here? Your approach is "I don't care, I don't have data in that last second, I know", but we were not talking specifically for your data.
Ç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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform