>>What's the best way to get items from a second table that do NOT match records from the first one using a query? This is obviously useful when calculating differences in tables. Most people still say that needs to be coded, what's your thought on this?
>>
>>TIA
>>
>>Gil
>Gil,
>
>
>
>SELECT * FROM TableB WHERE TableB.PK NOT IN(SELECT PK FROM TableA) ...
>
>
Hi, Jim. Will following Select-SQL statement faster??
SELECT TABLEB.* FROM TABLEB LEFT OUTER JOIN TABLEA ;
ON TABLEB.PK = TABLEA.PK ;
WHERE TABLEB.PK != TABLEA.PK
OR
SELECT TABLEB.* FROM TABLEB LEFT OUTER JOIN TABLEA ;
ON TABLEB.PK = TABLEA.PK ;
WHERE TABLEA.PK = ""
It may be a new thread on comparing in using VFP Join VS SubQuery on Speed!
because outer join really time consuming.
p.s. Just a discussion only.
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.