Hi Yatindar,
data have; infile datalines dsd ; length Name $200 Address $200; input Name $ Address $ Account_ID ;
datalines; Arnold , Pitt Street, 123 Stallone, Pitt Street, 123 Willis, Pitt Street, 123 Smith, George Street, 123 ; run;
proc sort data=have; by address account_id; run;
data required; set have; by address account_id; length new_name $200; retain new_name ' '; if first.address then new_name=strip(name); else new_name=strip(new_name)||' and '||strip(name); name=new_name; drop new_name; if last.address; run;
Please find the solution
... View more