Hii,
i have duplicate id's and add customer numbers and write in another column next delete one duplicate rows
like this
Hii,
i have duplicate id's and add customer numbers and write in another column next delete one duplicate rows
like this
output like this
when we are removing duplicates with respect to “id column"
dataTable new_dt =
old_dt.AsEnumerable().GroupBy(Function(i) i.Field(Of String)(“id”)).Select(Function(g) g.First).CopyToDataTable
Cheers
i want add(+) custmer numbers in duplicate id’s
like this
dt.AsEnumerable.GroupBy(function(r) r(0).tostring).Select(function(g) dt.Clone.LoadDataRow(g.First().ItemArray.Take(4).Concat({g.Sum(function(a) Cdbl(a(1)))}).ToArray,True)).copytodatatable
cheers