Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using IN and NOT IN clause for SQL in ODBC
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00788819
Message ID:
00788869
Vues:
19
>when I run sqlexec to pull data down from one table based on if it exsits in another table that is filtered, it work great. HOwever, if i want to see data in the table that doesn't exsists in the other table that is filtered, ODBC doesn't seem to know how to handle it.
>
>This select statement sent to ODBC work ok
>SELECT iPK FROM Table1 WHERE iPK IN (SELECT iPK FROM Table2 WHERE cStatus IN ('A','B'))
>
>This select doesn't
>SELECT iPK FROM Table1 WHERE iPK NOT IN (SELECT iPK FROM Table2 WHERE cStatus IN ('A','B'))
>
>
>my examples tables contain about 600,000 (table1) and 3,000,000 (table2) records.
>

Hi Mark,

It would be helpfull to know what exactly doesn't work. Do you get an error or result isn't what you expected or something else?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform