Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select with Subquery confusion
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00053103
Message ID:
00053402
Vues:
28
>The EXIST key word is like a NOT EMPTY (or testing _TALLY, but you can't do that in a SELECT-SQL). Ie: if the inner query is not empty, the record is included in the main query result. If the inner query is empty, the record is not included in the main query result (obvious, isn't it?:)).
>
>In your case, the inner query doesn't depend on the main one, so, the result is the same for all records in the source table. Since this result of the inner query is not empty and you test with !EXIST, the condition is false for all records, so the main result is empty.
>
>This also explains the other sample you gave in this thread.
>
>Vlad

Vlad,
Sorry to say this but you lost me with this explanation. I think its just because I'm trying to use NOT EXISTS instead of a straight WHERE EXISTS. Plus too, my inner query isnt empty. Regardless, I did figure out my problem here, see my response on this thread to Jim Nelson. Thanks anyway! :D)
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform