Merge two datatables with common column


#1

Hi i would like to use merge datatable activity but would like to ask what would happen if both datatables only have one common column, and i would like to merge all columns according to that common column.

eg. Table 1
Name Age
A 11
B 12

Table 2
Name Address
A USA
B UK

to become Table 3
Name Age Address
A 11 USA
B 12 UK


#2

Hi @inyourgravity,

Refer this post
Join Two Data table

Regards,
Arivu


#3

@arivu96

May I ask if it is possible to join two datatable with different number of rows?

The truth is, I have 3 datatables which share one common column.
Table 1 is the main column, for example holds the below data:

Name Age
A 1
B 2
C 3

Then there is Table 2 which holds information for A and C

Name Address
A USA
C UK

There is also Table 3 which holds information for B
Name Height
B 150

As you can see Table 2 and 3 will bring in new columns to Table 1. None of their new columns will be the same as each other, so does the rows (if table 2 holds information for A, A won’t appear in B)

The reason I want to join these tables together is mainly cause I needed the column “Age” from Table 1. If there’re better ways to do this, please advise.

Thank you very much.


#4

Hi @inyourgravity,

Refer this post

Regards,
Arivu


#5

hi,
You can follow below tutorial,

thanks,
Karthik.


#6