• John Paul -

    SQL Server allows you to use joins in your DELETE statements, so perhaps having EXISTS is not necessary.

    Assuming the primary key in both tables is Pkey, you could use something like:

    DELETE Table1

    from

    Table1 inner join

    (Select * from Table1

    INTERSECT

    SELECT * from Table2

    ) DupeList on Table1.pkey=DupeList.Pkey

    Note: you want to use EXPLICIT column lists instead of * in the INTERSECT statement, just to make sure that the columns are appropriately lined up with each other.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?