In that case I think this s join with a Like should be OK
data tableA;
length sponsor $5;
infile datalines;
input sponsor;
datalines;
Cola
Pepsi
Fanta
;
run;
data tableB;
length id 8 collaborator $18;
infile datalines dlm=",";
input id collaborator;;
datalines;
1,sponsored by Cola
2,Charity foundation
3,law firm LLC
4,Organge Fanta
5,Home Depot
6,Pepsi-Gametime
7,pepsi|cranberry
;
run;
proc sql;
create table tableC
as select *
from tableB
left join
tableA on upcase(tableB.collaborator) like "%"||upcase(trim(tableA.sponsor))||"%"
order by id;
quit;
... View more