Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why?????
Message
From
29/05/2003 02:46:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Why?????
Miscellaneous
Thread ID:
00793822
Message ID:
00793822
Views:
58
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.
Next
Reply
Map
View

Click here to load this message in the networking platform