Author: Stephen Russell
Posted: 2009-03-12 at 15:09:48
On Thu, Mar 12, 2009 at 1:58 PM, KAM.covad
<a_gmail_noSpam@kenmcginnis.com> 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?
------------------------
Select top 1 <column list>
from yourTable
where dDate <= ldDate
order by dDate descending
For Fox 7 and higher I believe, maybe you need 8??
HTH
--
Stephen Russell
Sr. Production Systems Programmer
Web and Windows Development
Independent Contractor
Memphis TN
901.246-0159