How to Get the uncommon row from DT1

i m having DT1 and DT2 i need to compare with DT1 if their is a new row other that DT2 data table i need to get that as the output

i used this but not getting correctly


Use join data tables activity

1 Like

hi @ganesh4
is join type left

Hi @Tharusha.fernando ,

Use below expression.

dt1.AsEnumerable().Where(Function(row) NOT dt2.AsEnumerable().Any(Function(x) x(“name”).ToString=row(“name”).ToString)).CopyToDatatable

Let me know if you face any issue.

1 Like

You can also refer below process files.
It have both code to get matched and unmatched data. (16.5 KB)

hi @ermanoj3101
if i need to compare both “Name” and “age” how should the code change

Use as dt1.AsEnumerable().Where(Function(row) dt2.AsEnumerable().Any(Function(x) x(“name”).ToString=row(“name”).ToString and x(“age”).ToString=row(“age”).ToString)).CopyToDatatable

1 Like

Thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.