Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Subselect
Message
De
21/04/2006 02:43:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01115214
Message ID:
01115246
Vues:
7
>My example was off. But in my real SQL the Subselect returned some NULL vales. So I recoded the Subselect to have a WHERE field1 is not null and the "not in" worked.
>
>>The NOT IN is a part of WHERE clause
>>... WHERE table1.field1 NOT IN ...
>>>SELECT table1.field1
>>>FROM table1 NOT IN
>>>(SELECT DISTINCT table2.field1
>>>FROM table2);
>>>
>>>Why does the "NOT IN" not work?
>>>
>>>Brenda

uses
NOT EXISTS(SELECT*FROM table2 WHERE field1=table1.field1)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform