Input:
Clo1 Clo2
A 1
B 2
A 3
Expected output
Clo1 Clo2
B 2
Compare using col1
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:
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
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.
@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: