Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exclude some records from a table
Message
 
À
24/02/2005 11:13:10
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 6 SP5
OS:
Windows '98
Database:
Visual FoxPro
Divers
Thread ID:
00990141
Message ID:
00990145
Vues:
18
>Hello, i have two tables and there are some matching records from one table to the other, i need to build a sql statement where displays only the records that does not match. How can i do this?
>
>Thanks for the support.
SELECT * FROM Table1;
       LEFT JOIN Table2 ON Table1.Key == Table2.Key;
       WHERE ISNULL(Table2.Key);
INTO CURSOR cBrowse

*** Other way

SELECT * FROM Table1;
       WHERE .NOT. Table1.Key IN (SELECT DIST Table2.Key FROM Table2);
INTO CURSOR cBrowse
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform