I have 2 columns that need to be combined as one, whats the best way to merge these 2 columns?
@Hi2023
Workflow:
Step 1: Input
Step 2: Select tool
Step 3:
Step 4:
Many thanks
Shanker V
the best way is to use union tool.
Hey @Hi2023, do you just simply want to combine them like this?
Or do you mean they're coming from 2 separate sources and you need to do a join of the two tables?
Hi @Hi2023
Please find the below use case.
Input:
Output:
My solution will work even for huge datasets too.
If you want to remove the duplicates, then you can use unique tool to remove the duplicates.
Kindly accept this solution if it provided a solution to your question.
Depending on your exact requirements for combining, you can also use a Formula tool, to determine which column's value to use.
For example, assume you have data like this below and you want to combine Column1 and Column2:
You could create a "New Column" with the following expression: IF IsNull(Column1) Then Column2 ELSE Column1 ENDIF
If you want to combined them under each other then union. If they have some unique ID in both and you want to combined them horizontally, then the join tool and joining by the unique value.