How to group duplicate rows and write each duplicate row to another table minus 1 of each duplicate group

we can help for a LINQ as well

Do a start with below and get all duplicated rows grouped by the the 2 cols

(From d in dtData.AsEnumerable
Group d by k1=d(0).toString.Trim, k2=d(1).ToString.Trim into grp=Group
Where grp.Count > 1
Select g = grp).SelectMany(Function (x) x).CopyToDataTable
1 Like