Hi everyone, hope you are doing well.
I have a problem with comparing two Data Tables:
example: I am having 2 DataTables, dtprevious and dtnew, I want to compare the DataTAbles in such a way to see if there’s been any modification with the data
this is dtprevious
this is dtnew
As you can see in dtnew there is a slight modification in the name David, City Sydney and name Mash.
I want to write only the modified values in new sheet.
How can I do this?..Plz help
Thanks in advance
P.S: this is only sample data. I have data in thousands of rows with long names as well
dt1.AsEnumerable.Zip(dt2.AsEnumerable,Function(r1,r2) dt1.Clone.LoadDataRow(r1.ItemArray.Zip(r2.ItemArray,Function(v1,v2) if (v1.ToString=v2.ToString,"",v2.ToString)).ToArray(),False)).CopyToDataTable