I have two data tables ("Table_A" and "Table_B"), both of which have a column "ID". They also both contain a column "Data_1", however with different values. In addition, Table_B has a column "Data_2".
I would like to add Data_2 from Table_B to Table_A by matching the ID columns, however, Data_1 in Table_A should NOT be updated with the values of Data_1 in Table_B. This is the desired result:
The only way I have found to achieve this is by using the Join command, by giving the particular output columns I require:
However, this creates a new table. I would prefer Data_2 from Table_B to simply be added to Table_A, without any further modifications to Table_A (which is why I cannot use Update). Is there a way to achieve this?
Hi all,
thanks lots for your very helpful input.
I chose PMroz' method as 'correct answer' because I felt creating a subset using only the required columns was slightly more concise than duplicating the table first and then deleting columns, but obviously the other approaches work equally as well.
This solution does the trick for me. I am still surprised though that there is no option in the Update command to just add one particular column and leave everything else in the target table untouched. I initially thought the "Add Columns from Update table - Selected" option would do this, but clearly this is not the case.
Thanks again for all your replies, I really appreciate it!