Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are Left Outer Joins possible in FoxPro 2.5 DOS?
Message
 
To
06/10/1998 21:18:28
Chris Laffoon
Florists' Interlink, Inc.
Paragould, Arkansas, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00144427
Message ID:
00144429
Views:
41
>I was composing a SQL query in FoxPro 2.5 DOS, and ran into the need for a Left-Outer-Join. Is there a way to create such a query using the SQL-Select command?
>
>Thanks, Chris

Chris,

Yes there is, it involves a UNION and a subSELECT. Psuedo code follows;
SELECT Table1.Field1, Table2.Field2 ;
  FROM Table1, Table2 ;
 WHERE Table1.Id = Table2.Id ;
 UNION SELECT Table1.Fiedl1, SPACE(10) ;
         FROM Table1 ;
        WHERE Table1.Id NOT IN(SELECT Id FROM Table2) ;
 INTO CURSOR MyLOJ
The SPACE(10) is aplace holder for the fiedl from table2. It must be the same size and data type as the field in table2.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform