Forum Discussion

Nathan_H_'s avatar
Nathan_H_
Accelerator I
4 years ago
Solved

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 dupli...
  • Nathan_H_'s avatar
    Nathan_H_
    4 years ago

    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;