SELECT KeyField from AnotherTable Into Cursor KeyCursor INDEX ON KeyField TAG KeyField SELECT Mytable SET RELATION TO KeyField INTO KeyCursor SCAN FOR FOUND("KeyCursor") ... ENDSCAN>This looks promising. However, what would you do if several records in MyTable match KeyField? Would you recommend SET SKIP, or expand the SELECT to include a subquery (and get all PKs of table MyTable)?
SELECT KeyField from AnotherTable Into Cursor KeyCursor >>SET RELATION TO KeyField INTO Mytable >>SCAN >> ... >>ENDSCAN>>
>>>Pseudocode: >>> >>>SCAN where KeyField in (SELECT KeyField from AnotherTable) >>> ... >>>ENDSCAN >>>>>>