Need to update the column in the master file, say Column1
has A
& B
values.
I have a different set of a file (mapping file) which has 2 different columns Column1
has only A
values & Column2
has only B
values which have unique values.
My requirement is to replace only A
values to B
and presented B
values must retain same as in the column in the master file.
Please help me to write the update statement in SAS SQL.
I have tried this,
PROC SQL;
UPDATE MASTERTABLE K
SET COLUMN1 = (SELECT L.COLUMN2 FROM MAPPINGFILE L WHERE K.COLUMN1= L.COLUMN1);
QUIT;