Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to find orphans - seek vs SQL
Message
From
23/11/2000 02:46:41
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00444141
Message ID:
00444896
Views:
29
Hi Nadya,
>>SCAN FOR !KEYMATCH(ProgID,nYourTagNo,"Table2")
>
>Great! With KeyMatch it took only 29,5sec. with set deleted on and 23,8 sec with set deleted off.

>Yes, you suggested the best method. The only little problem with deleted records, but I may add another condition in scan for!keymatch() and !deleted('PropMstr') It should not slow down the process.

Sorry to disappoint you but the DELETED() function is getting you nowhere here. Since the recordpointer in the second table is never moved there is no quick way to check if the related record in table2 is deleted, unless you'are sure that the index does not contain any nodes for deleted records. This can be done in two ways:
1. ensure that there are no deleted records in table2.
2. ensure that the index used in KEYMATCH is filtered with "FOR !DELETED().

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform