Comprare two datatables, then eliminated Database values are dependent on one another

in addition to above we have several options:

Non-LINQ: Data Join

  • Join DataTable
  • Filter DataTable on the Join Result

EDITED and incorporated:

LINQ - inner Join
assign activity:
dtResult =

(From d1 in dt1.AsEnumerable()
Join d2 in dt2.AsEnumerable()
On d1("Name").toString.ToUpper.Trim Equals d2("Name").toString.ToUpper.Trim
Where Not d1("Address").toString.ToUpper.Trim.Equals("AAA")
Where Not d2("value").toString.ToUpper.Trim.Equals("FALSE")
Select r = d2).CopyToDataTable

Only dt1 NON-Adress AAA are further checked

LINQ - Match
assign activity:
dtResult =

(From d2 in dt2.AsEnumerable()
Let n = d2("Name").toString.ToUpper.Trim
Where dt1.AsEnumerable.Any(Function (d1) d1("Name").toString.ToUpper.Trim.Equals(n) AndAlso Not d1("Adress").toString.ToUpper.Trim.Equals("AAA"))
Where Not d2("value").toString.ToUpper.Trim.Equals("FALSE")
Select r = d2).CopyToDataTable

Handling empty results we do:
:ambulance: :sos: [FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum