Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to join 3 tables
Message
De
21/10/2003 19:49:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
21/10/2003 19:45:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00840872
Message ID:
00840901
Vues:
19
>>>I mean you don't have to nest them. This works the same, and is easier to read.
>>>
>>>sele a.pn ;
>>>   from pnvendor a;
>>>      left join inv b on a.pn = b.pn ;
>>>      left join Table3 on b.KeyField = Table3.KeyField ;
>>>   where [SomeCondition]
>>>
>>
>>This will join tables 1 and 2, and tables 1 and 3.
>>
>>My second example joined tables 1 and 2, and tables 2 and 3.
>
>Actually, it does join 1 and 2, 2 and 3 : pnvendor [a] to inv [b] and inv [b] to table3.

What??? That really looks strange to me - not the way I am accustomed. It seems I will have to do some experimenting on this.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform