Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change JOIN to exclude?
Message
De
15/08/2008 09:13:09
 
 
À
14/08/2008 17:13:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01339003
Message ID:
01339089
Vues:
10
>>Hi,
>>
>>How do I change the following SQL Select so that it will return only those records in MyTable1 that have no child records in MyTable2:
>>
>>
>>select * from mytable1 join mytable2 on mytable1.fld1 = mytable2.fld1
>>
>>
>>Thank you in advance for any help.
>How about
>select t1.* from mytable1 t1 inner join mytable2 t2 on t1.fld1 <> t2.fld1

This won't work. You'll get each record from t1 matched to every record in t2, except for the one where the key fields match.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform