Home Forums SQL Server 2008 T-SQL (SS2K8) Identify Duplicate Records according to Multiple Criteria RE: Identify Duplicate Records according to Multiple Criteria

  • Sy-1148362 (11/30/2013)


    Hi There!

    I have an Employee table with Columns:

    EmpID | FirstName | MiddleName | LastName | SSN | BirthDate | HireDate | City | Zip

    Requirement: I have to identify the duplicate records based on below criteria:

    Criteria1: SSN

    Criteria2: FirstName, LastName, BirthDate

    Criteria2: FirstName, LastName, City, Zip

    Please tell how to accomplish this task........Thanks in Advance

    You'll get much more help if you show what you've tried.

    --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)