proc sql ;
create table two as
select * from one
where hist like '%STR%' or hist like '%ST1%' or hist like '%ST2%';
quit;
写了上面的code,但是sas报错:
ERROR: Expected open parenthesis after macro function name not found.
和WARNING: Apparent invocation of macro ST2 not resolved。
请问如果想选出变量hist里包含STR 或者 ST1 或者ST2字符,该怎么修改上面的code呢
?非常感谢!
d*******y 发帖数: 1154
2
%str('%STR%')
【在 w*******e 的大作中提到】 : proc sql ; : create table two as : select * from one : where hist like '%STR%' or hist like '%ST1%' or hist like '%ST2%'; : : quit; : 写了上面的code,但是sas报错: : ERROR: Expected open parenthesis after macro function name not found. : 和WARNING: Apparent invocation of macro ST2 not resolved。 : 请问如果想选出变量hist里包含STR 或者 ST1 或者ST2字符,该怎么修改上面的code呢
a********s 发帖数: 188
3
Just be curious and tried: It works pretty well in my SAS.