I have an issue to delete data in datatable D1 which is match data from datatabe from D2.
I try run below query but I did not get the result which is supposed delete the data that match from D2.
I really need help to fix below Query.
Data Table as
D1
D2
Expected Result
I did try use this query
D1.AsEnumerable().Where(Function(row) Not D2.AsEnumerable().Select(Function(r) r(3).ToString).Any(Function(x) x = row(3).ToString)).CopyToDataTable
(From d in D1.AsEnumerable()
Where not D2.AsEnumerable().Select(Function(r) r(2).ToString.Trim).Any(Function(x) x = d(2).ToString.Trim)
Select res = d).CopyToDataTable
got it run with your excels by using following statement
(From d In D1.AsEnumerable()
Where Not D2.AsEnumerable().Select(Function(r) r(1).ToString.Trim).Any(Function(x) x.Equals(d(2).ToString.Trim))
Select res = d).CopyToDataTable