Multiple Outer Joins

  • Apologies if this has been asked before, but I need help with multiple left outer joins as below :

    I want to do a left outer join between table A and Table B (No problem).

    I also want to do a Left outer join between table A and Table C in the same query. Can't get the syntax to work on this one.

    I've tried variations on the syntax below, all of which incur syntax errors :

    Select <col list> from

    tablea left outer join tableb left outer join tablec on

    (<Table a - table b join condition>),

    (<Table a - table c join condition>)

    Any ideas ?

    Regards

    Andy Eastwell

  • Try:-

    select

    <col list>

    from

    a

    left outer join b on a.? = b.?

    left outer join c on a.? = c.?

    Regards,

    Andy Jones

    .

  • Or as you had started

    Select <col list> from

    tablea left outer join tableb left outer join tablec

    on

    (<Table a - table b join condition>)

    on

    (<Table a - table c join condition>)

    will work as well you just have to create a seperate on for each join and the conditional cols of the join.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply