Remove rows or duplicates from datatable

Input:

Clo1 Clo2
A 1
B 2
A 3

Expected output

Clo1 Clo2
B 2

Compare using col1

Hi @kirti.iyer

Fortunately, it is a common request and there is plenty of solutions on the forum. One of them here:

1 Like

Hi @kirti.iyer

Try Remove Duplicate rows activity it may help you.

regards,
Pathrudu

My requirement is if duplicates are there then it should remove both.
Input
A
B
A

Output
B

I dont want duplicates

Slightly less common request, but there you go :slight_smile:

DistinctRows_LINQ2.zip (8.0 KB)

It is a variation of the solution from this topic:

Let me know if you have any questions. It is more of an advanced way of handling it.

1 Like

@loginerror I need your help because I want to check duplicate for multi columns. How to add another column in this Value(InArgument)?

dt25.AsEnumerable().GroupBy(Function(a) a.Field(Of String)(“Invoice No.”)).Select(Function(b) b.First).CopyToDataTable()

Another column:

  1. Invoice Date
  2. Invoice Amount