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?
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.
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,
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
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.
If the column names are different it will add that column in the next cell of last column.
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.
Yes, that’s exactly what I wanted.
But why isn’t it not working?
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)
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.
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.
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.
How was it, @vivek_Chowdary?
@Jan_Brian_Despi It is working fine. But its generating some errors.