Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting records that do NOT match a query
Message
From
06/04/1998 21:24:52
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00089645
Message ID:
00090023
Views:
25
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform