I am struggling to select records in a DataTable where there are duplicates.
Here is a sample data in my DataTable.
Here is the code I am trying to run to retrieve duplcate records, but somehow its not working.
dt_duplicateRecords = (From d In dtOutput Group d By k1=d(2).toString.Trim, k2=d(3).toString.Trim,k3=d(5).toString.Trim Into grp=Group Where grp.Count >1 Select grp.toList).SelectMany(Function (x) x).CopyToDatatable
Can someone please assist? I want to be able to select all records including the duplicates, so in the above example first 2 rows