Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting records that do NOT match a query
Message
De
06/04/1998 21:24:52
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00089645
Message ID:
00090023
Vues:
29
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform