• Vertigo44 (4/17/2013)


    I think I got it using a full outer join.

    Yes, it would, but it is not necessarily quite the thing you want, unless you want to see all the missing DRs that are HALs as well. What you really are after (from what I guess from your description) is either a LEFT OUTER JOIN or a RIGHT OUTER JOIN.

    LEFT OUTER JOIN (or LEFT JOIN for short) gives you a row from every row in the left-hand table (the one mentioned in the FROM clause), no matter whether there is a row matching in the right-hand table (the one in the LEFT JOIN clause), where if there is no match all columns from the right-hand side will be NULL.

    RIGHT OUTER JOIN (or RIGHT JOIN for short) works the opposite way. You get a row for each row in the JOIN, no matter whether there is a matching row in the FROM, but the left-hand ones will be NULLs.

    FULL OUTER JOIN combines the two traits, in that you will always get both the left and right hand sides, with NULLs on the opposite end if there is no match.

    So, if you want to see the HALs with no DRs (which is your master data table) and you expect new Drs to come on board, I'd select from DRs and right-join to HAL and Dr. Dennis K. Huges will appear as well.

    Did this help?

    Edit: Finished off the last sentence.

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]