Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fewer steps to get to a certain record in a table?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Fewer steps to get to a certain record in a table?
Divers
Thread ID:
00533040
Message ID:
00533040
Vues:
64
I have a table full of records with a date field in each record. The date field is D 8. For example I see 02/07/1999 when I browse the table. Of course there are other fields in the record, but the date field is the one I need to use to find the last record for a given year.

My table has the following records with dates in them (the actual table has about 4000 records in it, but this is an example to illustrate what I am trying to accomplish -
MyTable Date Field (D 8)
03/06/1995
03/07/1995
01/04/1996
07/04/1996
09/22/1996
02/22/1997
08/15/1997
11/27/1997
12/22/1997
04/07/1998
05/19/1998
and so on ...

Can I locate the last record for 1997 in fewer steps? Right now, I have a SCAN ... ENDSCAN with a DO WHILE ... ENDDO running inside of that to locate the last record in a given year. It seems like there should be a way to go to the last record for a given year in a single command? I think I am going about this the long way.

Help please and thank you.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform