Compare two data tables and remove not Matching rows

i want to compare two data tables and remove not matching rows from the first data table…how can I do that?


You can use filter data table activity to achieve your requirement…

Have a look on this image



I want to remove not matching rows from the first table and update it in the same excel sheet…am I be able to do that using this activity?


Can you try to use Join Datatable activity and Filter Datatable activity?

First, Join two datatable with full join. Then not matching row will be blank.
Next filter blank rows and unnecessary column using Filter DataTable.

Or we can achieve it using LINQ. In this case, can you share more details?


1 Like

Hi @Althaf_nazeer_Nazeer

create a datatable using build data datatable activity

Put the below syntax inside assign activity ( Out_dt is a output variable from build datatable activity)

From row in Input_Dt1
Join row2 in Input_Dt2
on CStr(row(“your column name”)) Equals CStr(row2(“your column name”))
Select Out_Dt.Rows.Add({row(“your column name 1”),row(“your column name 2”),row(“your column name 3”)})

use the Out_Dt datatable variable where you want to update


1 Like