Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00806128
Message ID:
00806139
Vues:
13
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform