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
ExtractDataTable.AsEnumerable().Except(updatedDatatable.AsEnumerable(),System.Data.DataRowComparer.Default).copydatatable
ganesh4
(Ganesh)
July 20, 2021, 10:10am
2
Use join data tables activity
UiPath.Core.Activities.JoinDataTables Combines rows from two tables by using values common to each other, according to a Join rule, which is specified in the JoinType property. Properties Common DisplayName - The display name of the activity. Input...
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.
LinqLeftAndRightJoin.zip (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
system
(system)
Closed
July 23, 2021, 10:26am
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.