Hi Team,
I have one data table, table contains 4 columns,
First 3 columns any one column have unique values, so that scenario not a duplicate.
Dt1 : input
Dt2 : output
Hi Team,
I have one data table, table contains 4 columns,
First 3 columns any one column have unique values, so that scenario not a duplicate.
Dt1 : input
check the reference
dt = dt.AsEnumerable() _
.GroupBy(Function(row) String.Join(",", row.ItemArray), Function(key) key.First()) _
.CopyToDataTable()
I hope it helps
Can you try the below
DT.AsEnumerable() _
.GroupBy(Function(row) row.Field(Of String)("Name") & row.Field(Of Integer)("Age") & row.Field(Of String)("City")) _
.Select(Function(Group) Group.First()) _
.CopyToDataTable()
Output:
Cheers!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.