Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I do multiple JOINS in an SQL SELECT?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00361751
Message ID:
00361754
Vues:
15
Steve,

You will need to qualify the table names...

SELECT mytable.*;
FROM mytable ;
LEFT JOIN yourtable y1 ON mytable.mydata1 = y1.yourdata1 ;
LEFT JOIN yourtable y2 ON mytable.mydata2 = y2.yourdata2 ;
LEFT JOIN yourtable y3 ON mytable.mydata3 = y3.yourdata3 ;
INTO CURSOR rpt

HTH,

Phil

Is this how?

SELECT *;
FROM mytable ;
LEFT JOIN yourtable ON mytable.mydata1 = yourtable.yourdata1 ;
LEFT JOIN yourtable ON mytable.mydata2 = yourtable.yourdata2 ;
LEFT JOIN yourtable ON mytable.mydata3 = yourtable.yourdata3 ;
INTO CURSOR rpt

Thanks for the info.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform