Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help to copy free table struct and then insert records
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00356247
Message ID:
00356507
Views:
17
>>seek nCustNum
>>copy to test_table1 while CustNum = nCustNum

I meant to say that this would even be faster than SQL on a large table but only if all the records you need are sequential [which they probably are]. You are already at the first record of the group. The COPY WHILE will stop as soon as the WHILE is false.

Off topic: If you need to look for a particular record in a specific group of records you can LOCATE FOR WHILE. In an example of invoice lineitems where my order is invoice number.

SEEK nInvoiceNum
locate for item_no = 100101 while Invoice = nInvoiceNum

This will only search the next N records that have Invoice = nInvoiceNum
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform