Easy Way to Find Duplicates

Good day all.  Is there an easy way to identify all of the duplicates in an ItemType?  I am trying to move our parts into the OOTB Part ItemType.  During the process I discovered that I created duplicate entries.  I need to go through and remove them.  The only way I know how is to run a search on the parts, put it into an Excel document, filter all of the duplicates, look them up, and then delete the duplicates.  Thanks for the help.

  • Good question. So far I know Excel and SQL. 

    For collecting the affected data SQL offers a view more options. You can build your query to just display the duplicates. You can also display the id so you can then build an idlist for deleting the elements.

    But I would be happy to know if somebody else knows a better approach!

    Edit: It should be obvious but I am sure there will be one user that will try to do it: Don´t delete in SQL! Just use it for getting the data!

  • Angela,

    Thanks for the push.  I was able to get it to work by using the following C# method.

    Innovator myInnovator = this.newInnovator();
    Item results = myInnovator.applySQL(

    " select count(*) [Count], keyed_name " +
    " from [Part] " +
    " where is_current=1 " +
    " group by keyed_name, item_number " +
    " having count(*) >= 2 "
    );

    return results;