Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I do multiple JOINS in an SQL SELECT?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00361751
Message ID:
00361754
Views:
14
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform