When I try to merge two data tables together, it’s merging as shown below instead of parallelly. So can anyone please help me out with this error?
Hi @vivek_Chowdary,
Do the data tables have same number of columns and same column name?
Yes, the data tables have same number of columns with different column names.
Hi,
Merge Data Table will join the Columns together. So, if there are different column names in other table, it will add the column and leave blank fields for the other columns that didn’t match.
Let us know if this helps,
Regards,
Pavan H
@pavanh003
But why will the column names of two data tables be same? The purpose of merge activity is to merge 2 data tables however their column names might be right!
You should have same column names
Hi,
The column names must be same to merge the data table.
Instead of using merge datatable please try with append range activity, Append range will join the tables together regardless of columns.
Let us know if this helps.
Regards,
Pavan H
Hi,
If the column names are different it will add that column in the next cell of last column.
Regards,
Pavan H
As you said its adding the columns with different names next to last column which is what I wanted. But the problem is, its not adding the values parallel to previous values but below them as I have shown in the image above.
Yeah. I think what @vivek_Chowdary wants to happen is merge the data tables and the information/rows in the second data table should be appended to the first data table horizontally.
@Jan_Brian_Despi
Yes, that’s exactly what I wanted.
But why isn’t it not working?
HI,
When you use merge data table activity, the columns name should be same if the columns name are not same then the once that are same will be added to the bottom of the last row of first table corresponding to that column name and then if the columns which are not same will be added at the last.
Please refer the workflow.
Let us know if this helps.mergeExample.zip (16.3 KB)
Regards,
Pavan H
I clearly understood what you are trying to say. But its not working properly for my data tables. I will attach my file please check it once and revert back.
Hi @vivek_Chowdary,
Invoke this workflow file: Merger.xaml (10.2 KB)
Use the data table with 7 columns in the in_dt1
Then use the data table with 2 columns in the in_dt2
Then get the result of type data table out_dtResult.
Thanks and regards.
@pavanh003 Here’s my workflow file.PS3_Final_Project.zip (33.4 KB)
hi,
In your workflow you are adding the name table with dt2018.
In this case since the column doesnot exists the merge data table activity will ad the new row in the end of existing table and because of that the new column names are getting added in the end and to the next cell.
Instead of that if you can have a add data column activity(will add the column after the last column) and add the columns and then inside for each you can add the values to corresponding column.
Regards,
Pavan H
How was it, @vivek_Chowdary?
@Jan_Brian_Despi It is working fine. But its generating some errors.