Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for the nth Occurrence of a record
Message
De
03/08/2005 07:44:22
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01038056
Message ID:
01038086
Vues:
22
Hi,

>>
I would like to search a table for a record where a paricular field equals a value and then to give me a particular value from another field. This is fine. What if I wanted to look for a particular occurence. For example the 2nd occurence or the 3rd. But not the 1st or 4th. Is this possible?
>>
A variation on Tore's suggestion:
Select Recno() from yourtable where yourcondition into ARRAY aHits
* Assuming a bit of array bounds checking:
Goto aHits(2) in yourtable  && 2nd
HTH,
Viv
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform