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:
00361765
Views:
22
Another thought was :

SELECT *;
FROM mytable, yourtable ;
WHERE mytable.mydata1 = yourtable.yourdata1 ;
AND mytable.mydata2 = yourtable.yourdata2 ;
AND mytable.mydata3 = yourtable.yourdata3 ;
INTO CURSOR rpt

took me a little while to realise the subtle difference. In the original, you get everything for mytable + all matching joins from yourtable. In the one above, you only get the matching joins for the two tables, which was what I was looking for.
Mike

"I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong." - Richard Feynman
Previous
Reply
Map
View

Click here to load this message in the networking platform