Only keep duplicates in Data Table

I already know how to remove duplicate rows within a DT using the activity.

However, how do we do the opposite?
Where we keep only duplicated rows and delete all rows that do not have a duplicate?

Thanks in advance!

3 Likes

Kindly have a view on this thread

Cheers @Sami_Syed

@Sami_Syed
Alternate to the Join approach with a group by the duplicates can be detected as well

In general there are some Options/variations

  • Retrieve the duplicates rows within linq Statement
  • Retrieve the duplicates rows Key Info and use IT later for retrieval

A very important Info is about the duplicates:

  • Identified by all columns?
  • Identified by specific column(s)?

In Case of you are interrested on one of the approaches Let US know.

5 Likes

I dont understand any of the code on that solution. Could you explain it please?

I would like to retrieve the duplicate rows comparing all columns in one data table? Any inputs