Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00806128
Message ID:
00806143
Views:
16
>>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.

Thanks for the info.... I appreciate it!

Tommy
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform