06-10-2014 07:30 PM
I'm having problems using INDEX() function ...
I have a string variable which is a space separated list,
s = AGE WEIGHT GENDER HEIGHT
When I query a dataset like this:
where index("%upcase(%sysfunc(compbl(&s)))", compress(upcase(variablename), ' ')) > 0; quit;run;
I end up getting results like this:
I'm looking for a perfect match by word - not pattern. I was thinking of appending a space to either end of the search pattern, but I'm not sure if that's the most elegant
Need further help from the community? Please ask a new question.