Compare Two Datatables Without For Each

Hello and thanks in advance for the assistance.

I have two datatables as shown in the example screenshot old and new. I am trying to compare the new one to the old one and get the result as listed in the final expected result. My problem here is that i don’t want to loop through each row/column as my data is very massive. Thousands of rows in each dtatables.

Please assist. Thank you

@hatakora Check this Workflow :
I have used Join datatables to First make a Left Join on the New Datatable Keeping all it’s rows, and then have performed a Linq to keep not Matching records according to the Criteria I have assumed. Check if this is What you needed. Also if this is not the Expected output, Please explain the needed output Condition.
DeleteRowsMatchingCondition.zip (9.1 KB)

Thank you very much @supermanPunch that did it exactly for the result we wanted there. What if alternatively we want the result below instead?
So essentially for any row in the new dt that is the same as the old dt , the new one is the one to keep and keep also anything in the old dt that is not in the new dt as well as anything in the new dt that is not in the old dt.

See below for a clearer picture of the result

Screen Shot 2020-07-30 at 12.33.08 PM

@hatakora Try altering the Condition in the Linq query in assign Activity before the if Condition, most probably altering the condition would be able to get you the needed output.

I’ll try it on my end, and update if successful.

Also why doesn’t the second row contain the Scope value for Jane Doe?

@supermanPunch Because the data is not the same. The description is different in the new datatable

@hatakora Can you provide some other examples like when the Old DT has more rows than the New DT?

So i actually was able to get it done with the join activity. A left join to be specific

@hatakora You can post the Solution that you got, so that it might help others seeking the solution to the same type of problem. :smiley:

Yes sirr. What i did was a left join on both both table and then i filtered the output table to only keep the columns i needed