Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to join 3 tables
Message
From
21/10/2003 18:52:50
 
 
To
21/10/2003 18:44:00
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00840872
Message ID:
00840882
Views:
16
Hello Trey

Thank for you reply (please see my response to Sergey).

i have read the debate about single alias in querry's. although i have tested and NEVER found a problem with it, in my app's i always use "q_a". but in test runs i'll get lazy sometimes :-)


>>hello everybody
>>
>>i have 3 tables i need to join
>>pnvendor
>>inv
>>vendor
>>i am able to join the first 2 tables
>>sele a.pn ;
>>   from pnvendor a left join inv b on a.pn = b.pn ;
>>   where ;
>>      "1004" $ a.vendorid .and. ;
>>      "04AV205" $ a.pn
>>how do i add the 3rd table. the 3rd table (vendor) needs to be joint to the 1st table (pnvendor) on the vendorid field in the same way the 1st and the 2nd table are joint.
>>
>>thank for all your help as always!
>
>the same way
>
>
>sele a.pn ;
>   from pnvendor a ;
>   left join inv b on a.pn = b.pn ;
>   left join vendor v on a.vendorid = v.vendorid ;
>   where ;
>      "1004" $ a.vendorid .and. ;
>      "04AV205" $ a.pn
>
>I'll let someone else start the debate about using single character aliases <g>
Previous
Reply
Map
View

Click here to load this message in the networking platform