>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.
sele a.pn ; from pnvendor a; left join inv b on a.pn = b.pn ; left join vendor on a.keyfield = vendor.keyfield; where ; "1004" $ a.vendorid .and. ; "04AV205" $ a.pnIf you need to join the SECOND table to the third, the syntax becomes a little more involved; you have to insert stuff between the JOIN and ON, thusly:
sele a.pn ; from pnvendor a; left join inv b; left join Table3 on b.KeyField = Table3.KeyField; on a.pn = b.pn ; where [SomeCondition]Note that I alligned the first LEFT and the last ON, to indicate they go together.