>I want to process, in a SCAN loop, all records that satisfy a given condition. The condition is most easily expressed as a SELECT - SQL - but what is the best way to combine the two?
>
>
>Pseudocode:
>
>SCAN where KeyField in (SELECT KeyField from AnotherTable)
> ...
>ENDSCAN
>
>
>The processing itself is too complicated to place into a single INSERT - SQL command.
>
>Basic criteria: 1) code should not be too messy, 2) it should be reasonably fast.
How about:
SCAN
IF SEEK()
etc
or if you can do it, faster would be:
SCAN
IF INDEXSEEK()
etc
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.