Copy columns from two data table into one

Hi,

I have two data tables DT1 and DT2

DT-1 :

image

DT-2 :

image

I need a solution, which creates a new data table DT3 with two columns ‘dt1_country’ and ‘dt2_country’.

DT3 :

image

Thanks in Advance.

Hi,

How about the following?

dt3  = dt1.AsEnumerable.Zip(dt2.AsEnumerable,Function(r1,r2) dt3.LoadDataRow({r1("ActivityName").ToString,r2("ActivityName").ToString},False)).CopyToDataTable

Sample20230410-4L.zip (9.3 KB)

Regards,

1 Like

Thanks, Got it

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