Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for the nth Occurrence of a record
Message
From
03/08/2005 07:44:22
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01038056
Message ID:
01038086
Views:
23
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
Previous
Reply
Map
View

Click here to load this message in the networking platform