Returning the difference between two data tables

@jamills
Yes this is possible
dt2.AsEnumerable.Except(dt1.AsEnumerable,DataRowComparer.Default).ToList() will return a List(Of Datarow) result will be remaining dt2 rows after the except with dt1

if there are rows returned we can use CopyToDataTable and will get a datatable with the structure of dt2
if no rows are returned we would get an exception by using CopyToDataTable

A possible flow could look like this:
Assign Activity:
dt2.AsEnumerable.Except(dt1.AsEnumerable,DataRowComparer.Default).ToList()
to: yourDataRowListVar - Datatype: List(Of Datarow)

If Activity:
Condition: yourDataRowListVar.Count > 0
Then: using an assign activity - dtDiff = yourDataRowListVar.CopyToDataTable
Else: using an assign activity - dtDiff = dt2.Clone

Let us know your open questions

4 Likes