I think Patrick's code is very good. and if your table is not large , you also can get it by SQL. data Industry;
infile datalines truncover dsd;
input Industry_Nm:$40. Industry_Cd:$6.;
Industry_Nm=propcase(Industry_Nm);
datalines;
Electrical,001
Plumbing,002
Masonry,003
;
run;
data Company_Name;
infile datalines truncover dsd;
input Company_Nm:$80.;
datalines;
Steve's Plumbing
;
run;
proc sql;
create table want as
select * from Industry,Company_Name
where Company_Nm contains strip(Industry_Nm);
quit;
Xia Keshan
... View more