Datatable Comparison -

I have two datatables.


I want the perform a look up operation between dt1 and dt2 using the coulmn of “Name”.

And i want the result as below.


Am already using lookup datatable option from uipath. But its taking more time to get the result.

I need to do it through linq or code to faster the lookup operation.

Hi @Manikandasamy

Use merge datatable and try


your case can be implemented on a LeftJoin Approach:

find a starter help based on the Join Datatable activity:
FullJoin_LookUpMatches_MatchResult.xaml (9.7 KB)

find a starter help based on a LINQ statement:
LeftJoin_1Col_LookupResult.xaml (8.8 KB)



Thanks this works. I need a bit more help.

My datatable has more columns and i want to take all columns after the left join. Could you help me on that ?

just share some sample data along with the description of expected output with us. We will have a look on it.

This is the expected result.

give a try on following:

  • Use Join DataTable activity - Join type: Inner, dt1 to dt2 (out:dtJoin)
  • define a String Array with the Columns which you want to keep from dtJoin - arrCols
  • get result table by: dtJoin.DefaultView.toTable(false,arrCols)

the first requirement description was showing also the unmatched rows from dt2 in the result (hint for Full Join)
the second requirement description is showing the only common rows (hint for inner Join) and a selection of needed columns (hint for selecting with default view)

Also have a look here: