Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why?????
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Why?????
Divers
Thread ID:
00793822
Message ID:
00793822
Vues:
57
Why I get different sets of records:

Table1 (Name C(40), Key1 N(4), ...)
Table2 (Text C(60), Key1N(4), ChildKey C(100))
cChild = "000100050004"+SPACE(88)

1.)
SELECT Table1.*,Table2.Name AS T2Name FROM Table1 LEFT JOIN Table2 ON Table1.Key1 == Table2.Key1 WHERE Table2.ChildKey <> cChild INTO CURSOR Test

Here I get ALL the records from Table1 but the field T2Name is NULL for those records where Table2.ChildKey <> cChild


2.)
SELECT Table1.*,Table2.Name AS T2Name FROM Table1 LEFT JOIN Table2 ON Table1.Key1 == Table2.Key1 WHERE .NOT. Table2.ChildKey == cChild INTO CURSOR Test

Here I get filtered records from Table1.

Why?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform