• homebrew01 (10/5/2013)


    Chris, is this the equivalent of a LEFT JOIN based on 4 columns ?

    AND NOT EXISTS (SELECT 1 FROM T3

    WHERE T3.COL1 = T2.COL1

    AND T3.COL2 = T2.COL2

    AND T3.COL3 = T1.COL1

    AND T3.COL4 = T1.COL2)

    Yeh... but faster.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)