Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are Left Outer Joins possible in FoxPro 2.5 DOS?
Message
 
À
06/10/1998 21:18:28
Chris Laffoon
Florists' Interlink, Inc.
Paragould, Arkansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00144427
Message ID:
00144429
Vues:
43
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform