I had 2 datatable. I want to check data from table1 and verify in table2 if exits or not. If data not exits i want to add that data in table2 and if exits then i dont want to add that data.
Like if 1234 does not exits in table2 then i will add this to table2 and if 1234 exits in table2 then i dont want to add that.
Hi
Hope the below steps would help you resolve this
First let’s get the unmatched records between two tables like this using an Assign activity
Out_NonMatched_Data = In_DataTable1.AsEnumerable().Where(function(row) Not In_DataTable2.AsEnumerable().Select(function(r) r.Field(Of Int32)(In_DT2_ColName_To_Match.ToString)).Any(function(x) x = row.Field(Of Int32)(In_DT1_ColName_To_Match.ToString))).CopyToDataTable()
Then use a Merge datatable activity and merge th me found unmatched records and datatable 2 as u want where mention the source datatable as above found one and destination as datatable 2
[quote=“ppr, post:5, topic:577880”] new Object(){item1,item2......item15}.Concat(new Object(){item16........}).toArray()
Already
new Object(){Action,dailyWorkReportName,workOrder,jobCategory,pearceJob,location,dwrStatus,submittedDateTime,jobStopDate}.Concat(new Object(){workOrderStatusGroup,jobStatus,Technician,technicianManager,createdDate,state,Account,countDWR}).toArray()