I tried your approach in practice (the first one, couldn't get the second one working even after correcting the call typo).
I run some problems. Here is the sample code:
data MATCH;
length VAR $30;
input VAR $;
infile datalines dlm=',';
datalines;
testing.test,
Does work,
Special % char
;
run;
data HAVE;
length FVAR $300;
input FVAR $;
infile datalines dlm=',';
datalines;
testing.test the test code,
Does work or not,
Does not work or what,
Special % character in a string,
This is not included,
The test of testing.test
TESTING.TEST
;
run;
/*
proc sql;
create table WANT as
select A.*
from HAVE A
left join MATCH B
on index(A.FVAR,B.VAR)>0
where B.VAR is not null;
quit;
*/
proc sql;
create table WANT as
select A.*
from HAVE A
left join MATCH B
on index(strip(lowcase(A.FVAR)),strip(lowcase(B.VAR)))>0
where B.VAR is not null;
quit;
The result is not as intended. Do you have any idea why so?
EDIT: Ok there was a mistake in my example the old one is commented and edited one is live. However this does not solve my problem with the actual data... Don't know how I could find an example.
... View more