• OK, looking at your code, looks like you're trying to do everything in a single pass (which is often a good idea).

    In this case, you're using the WHEN NOT MATCHED predicate, which requires a Full Outer Join to include matched rows and unmatched rows in a single pass.

    The individual DELETE and UPDATE statements do not suffer from this issue, so they actually perform better.

    Hope this helps

    Gianluca

    -- Gianluca Sartori