Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for latest Date
Message
From
10/03/2005 15:34:59
 
 
To
10/03/2005 14:59:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00994588
Message ID:
00994607
Views:
18
Not tested, but how about something like this:
SELECT *;
   FROM MyTable;
   WHERE ABS (MyDate - {^ 2005/03/10}) =;
      (SELECT MIN (ABS (MyDate - {^ 2005/03/10})) FROM MyTable)
HTH

>I'm trying to write a query to return records from a table that are closest to a certain date. I'm not sure what the syntax should look like in my SQL select statement.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform