07-26-2017 01:02 PM
I have a table A like this:
Name Amount1 aaa 32 bbb 23
Another table B like this
Name Amount2 ccc 41 ddd 14
I try to append them in a C table like this:
Name Amount1 Amount2 aaa 32 . bbb 23 . ccc . 41 ddd . 14
I do this
data C; set A; run; PROC APPEND BASE=C DATA=B force;QUIT;
And I have this two warnings:
WARNING: Variable Amount2 was not found on BASE file. The variable will not be added to the BASE file. WARNING: Variable Amount1 was not found on DATA file.
Finally my table C doesn't have the Amount2 column.
How can I manage it?
Thanks for answer
07-26-2017 01:33 PM - edited 07-26-2017 01:34 PM
proc appends by name as you have different names as amount1 and amount2, they are trated as sperate variables. you have 2 options here. First one is rename amount 2 to amount1 or do insert as insert does not care for names and appending is done by position
insert into tableA
select * from tableB;