i Have a challenge to join datatables side by side

suppose Dt1 is

A B C

234 abc uipath

2435 def xxxxx

438 ghi tfgdyd

6253 det cfdtd

53 tefxt

Dt2 as

A B C

294 abc ucidth

35 def xxxxx

12 ghi tfgdyd

895 det

both datatables has to join side by side (L to R) direction

output as

A B C A B C

234 abc uipath 294 abc ucidth

2435 def xxxxx 35 def xxxxx

438 ghi tfgdyd 12 ghi tfgdyd

6253 det cfdtd 895 det

53 tefxt

in my case there are approximately 30 datatables to join L to R direction

New Microsoft Excel Worksheet.xlsx (10.6 KB)

please finfd the attachment of the excel for more information

Any Suggestion or idea to solve @arivu96

HI @saikrishna1

You can use **Add Data Table Column** activity and add the values to the new column within a **For Each Row** activity.

But I have these two questions for you…

- Does the two data tables have the same number of rows?
- If Dt1 is the datatable which you want to add columns to… how would be decide which row gets added to which row from dt2
- Is there any column in both datatables that contain a column value where we can join the two?

The solution to this can depend on your requirement to above…

Hi @Lahiru.Fernando

1.Both the datatables may not have same number of rows, it depends on daily transactions

2. all the data tables will have same number of columns

as in the attachment sheet1 , 2 and 3 having 3 column each

3. no need of identical rows to be added to the previous datatable

FYI , its like the transaction list of every day , we need to consolidate all the data into one sheet