• Apparently, the data quality of the XML you've been provided to work with is at an all time low. It seems to indicate the company has no clue what the proper name for EmployeeID X actually is nor what the ID for some given employee name is. It seems totally arbitrary to reject any duplicates either by ID or by Name.

    Would you actually want your name to be "deleted" from the mix because of this mistake?

    My recommendation would be to take the XML back to the people that created the problem and tell them the extreme danger they've managed to create in the XML. You are, after all, messing with employee data.

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