Get distinct Values from a Data table

Hi @jack.chan,

This code will delete the duplicate value and get the first match.

Please try this.

dtVar.AsEnumerable().GroupBy(Function(x) x.Field(of String)(“ColumnName”)).Select(Function(y) y.First()).CopyToDataTable

Regards
Ömer