>Hi cecil,
>
>Unlike using NOT IN() the NOT EXIST clause does not execute an extra query (but is internally processed like a join) and therefore should be faster in most cases.
>
>
>SELECT cFileName ;
> FROM tmpPDFFileNames a ;
> WHERE NOT EXIST(SELECT * FROM Scan b WHERE a.cFileName = b.cFileName) ;
> INTO CURSOR tmpPDFs
>
Actually, the NOT IN version of this query should be faster because the subquery only has to be executed once. In this version, the subquery has to be executed for each value of a.cFileName.
Tamar