How to merge two data table?

How to achieve the desired output ?

Name ID
Sameer 101
Abhishek 102
Sagar 103
Raju 104
Sandhya 105
Deepika 106
Name DOB
Sameer 13-12-1998
Abhishek 23-03-1989
Sagar 18 July,2001
Raju 04-02 1990
Sandhya 19.10.2002
Deepika 12.05.1996
desired output :

desired output :

Name ID DOB
Sameer 101 13-12-1998
Abhishek 102 23-03-1989
Sagar 103 18 July,2001
Raju 104 04-02 1990
Sandhya 105 19.10.2002
Deepika 106 12.05.1996

Hi @Kumar_Sahu_Sameer

Try this

Input DT1:

image

InputDT2:

image

Output:

image

Cheers!!

Hi @Kumar_Sahu_Sameer
Build DataTable:
image
Output: joinedData
Input1:
image
Output:dt1
Input2:


Output:dt2
Use Below query in assign acitivty:

joinedData= (From row1 In dt1.AsEnumerable()
                Join row2 In dt2.AsEnumerable()
                On row1("Name").ToString() Equals row2("Name").ToString()
                Select joinedData.LoadDataRow({row1("Name"), row1("ID"), row2("DOB")}, False)).CopyToDataTable()

Output:
image
Sequence16.xaml (10.0 KB)

Regards

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