Can anyone please provide me query to Remove Duplicate record from the Data Table based on 2 Column Names?
With below query I can remove duplicate rows based on 1 column name. dt.AsEnumerable().GroupBy(Function(i) i.Field(Of String)("ColumnName")).Select(Function(g) g.First).CopyToDataTable()
but actually I want to remove duplicate records from the dataTable based on 2 column values so don’t know how to add another column in above query or if you can provide me the query to achieve this would be great.
In this example I want to remove duplicate records based on Column1 and Column3:
Right, and i was Not talking about Filter Activity. With the Terms where, nonduplicated, groupocount a groupby approach with linq was mentioned, adressing your case
With below query I can remove duplicate rows based on 1 column name. dt.AsEnumerable().GroupBy(Function(i) i.Field(Of String)("ColumnName")).Select(Function(g) g.First).CopyToDataTable()
but don’t know how to add another column in above query or if you can provide me the query to achieve this would be great.