I think this will work in VFP9, but I haven't tested it...
SELECT * ;
FROM table ;
WHERE dateField = ( ;
SELECT MAX(date) ;
FROM table t2 ;
WHERE dateField <= ldRequired)
On Thu, Mar 12, 2009 at 14:58, KAM.covad <[email protected]> wrote:
> I have a table with a date field: dDate and thousands of records.
>
> The dates are scattered over time including the future. I need to find the
> record with the max date that is =< required date.
>
> How would you do this with sql select and also with Locate?
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.