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:
00361765
Vues:
24
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform