Currently after using the below code, I’m unable to get the expected results that I wanted. did I made any mistakes?
DT2.AsEnumerable().Where(Function(row) Not DT1.AsEnumerable().Select(Function(r) r.Field(Of String)(“Invoice Number”)).Any(Function(x) x = row.Field(Of String)(“Invoice Number”)) Or Not DT1.AsEnumerable().Select(Function(r) r.Field(Of String)(“Invoice Date”)).Any(Function(x) x = row.Field(Of String)(“Invoice Date”))).CopyToDataTable()
Dim diffIDs = dt2.AsEnumerable().[Select](Function(r) r.Field(Of String)("ChildValue")).Except(dt1.AsEnumerable().[Select](Function(r) r.Field(Of String)("BaseValue")))
Dim Table3 As DataTable = (From row In dt2.AsEnumerable() Join name In diffIDs On row.Field(Of String)("ChildValue") Equals name Select row).CopyToDataTable()