>I have a table with a datefield called LOADDATE.
>
>I want to find all the records with LOADDATE within one year from today's date (in the past)....
>
>What would be a quick and simple set of commands to do so....
>
>The tables are HUGE and have to processed quickly....
>
>Thanks!!!!
>
Tommy,
Probably best would be to use an SQL - SELECT to retrieve the records, using the BETWEEN command or function to filter the records. I'd also recommend using variables to store the dates in question:
ldstop = DATE()
ldstart = GOMONTH(ldstart, -12)
SELECT *;
FROM mytable;
WHERE BETWEEN(loaddate, ldstart, ldstop);
INTO CURSOR...
Hopefully, there's an idex on the loaddate field.
George
Ubi caritas et amor, deus ibi est