HSBC Interview Question

How does sas merge work?

Interview Answer

Anonymous

Jan 28, 2017

A SAS code can suffice this answer, so lets say if we want to merge 2 datasets namely SET1 & SET2 then, for merging we need to sort the datasets with same variable by which we need to merge these datasets. Proc sort data = SET1; by var1; Proc sort data = SET2; by var1; Data NEW; merge SET1 SET2; by var1; run; dataset NEW will be the merged dataset by var1.