• Andy,

    Thank you for the great post. This tutorial helped me a lot. I think your delete script is deleting from the source table instead of the destination table. The script should have been:

    [font="Courier New"]Delete dest

    From dbo.Contact dest

    Join StageDeletes stage

    On stage.Email = dest.Email[/font]

    The table should have been dbo.Contact instead of Person.Contact. And the test script should change to:

    Use AdventureWorks

    go

    Select Count(*) As RecCount

    From dbo.Contact

    Where FirstName = 'Andy'

    And LastName = 'Leonard'