I'm trying to write some code that merges on a new column of data onto the master dataset.
As this is being written as a macro, I would prefer that no new dataset is created in the process.
I have achieved this using the following code:
PROC SQL;
ALTER TABLE table1
ADD ADD_TYP Character length=12 format=$12.;
QUIT;
PROC SQL;
UPDATE table1 as A
SET ADD_TYP = (SELECT B.ADD_TYP FROM Address_Index as B
WHERE A.Key=B.Key);
QUIT;
However, the processing time is horrendous. Is this normal? The left join is done in 5 seconds.
I am considering just doing "CREATE TABLE table1" i.e. Overwriting but with error messages in SAS