How to compares two different data tables and get unmatched values?

Hi,
I have two different data tables OrderDT
image

and SAPDT
image

I need to compare these two data table and get the unmatched values.

I want to compare “ORDER” column in OrderDT and “Doc No” in SAPDT.

For example, the values 54321 and 78654 are not in the table SAPDT I want to get these values.

Thanks.

@makboga

Regards

one of many approaches

Assign Activity:
arrOrders | String Array
dtOrder.AsEnumerable.Select(Function (x) x(“ORDER”).toString.Trim).Distinct().ToArray()

Assign Activity:
arrDocNos | String Array
dtSAP.AsEnumerable.Select(Function (x) x(“Doc No”).toString.Trim).Distinct().ToArray()

Assign Activity
arrMissing | String Array
arrOrders.Except(arrDocNos).toArray

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