I have a list of strings, now I like to use proc sql to select obs from a dataset that one variable begins or contains ANY of the string in the given string list. There are many strings in the given string list, and the lengths of strings are variable, so I can't use functions such as substring().
I tried to do this do this way:
proc sql;
select * from myds where onevar contains ANY ('str1', 'str2', 'str3', 'str4', 'str5', 'str6', 'str7');
but it doesn't work. Any better way to do it? thanks.
... View more