How to Merge Two Data table

Hi,

Hope the following sample helps you.

dtA = dtA.AsEnumerable.Zip(dtB.AsEnumerable,Function(r1,r2) dtA.Clone.LoadDataRow(r1.ItemArray.Zip(r2.ItemArray,Function(v1,v2) if(String.IsNullOrEmpty(v1.ToString),v2,v1)).ToArray,False)).CopyToDataTable

Sample20221222-3aL.zip (2.9 KB)

Regards,

6 Likes