yes.
As an example, please check that the following three sql statements all give the same result.
data _null_;
call symput('rep_run',upcase("'closing run'' insurance','insurance','secondary closing run insurance','business insurance','RI_BCT'"));
run;
data test;
length rep_run $30;
rep_run="CLOSING RUN' INSURANCE";output;
rep_run='CLOSING RUN'' INSURANCE';output;
rep_run='RI_BC';output;
rep_run='BUSINESS INSURANCE';output;
run;
Proc Sql ;
Select rep_run
,(Case
When (rep_run) in (&rep_run.)
then 'PI_PPT'
else ' '
end
) as x
from test;
Proc Sql ;
Select rep_run
,(Case
When (rep_run) in ('CLOSING RUN'' INSURANCE'
,"BUSINESS INSURANCE"
,"INSURANCE"
,'RI_BCT')
then 'PI_PPT'
else ' '
end
) as x
from test;
Proc Sql ;
Select rep_run
,(Case
When (rep_run) in ("CLOSING RUN' INSURANCE"
,"BUSINESS INSURANCE"
,"INSURANCE"
,'RI_BCT')
then 'PI_PPT'
else ' '
end
) as x
from test;
quit;
... View more