As far as I know, the in operator and the colon operator modifier work splendidly before, during and after a datastep. What I mean is that the following three statements all work (albeit slightly differently):
However, it appears that such is not the case in PROC SQL. In the 2 codes below, only the second one works.
Am I correct? And if so, why is that????
Finally, how do you make this code work:
Code:
data test2;
set test;
where textnumber in:('1','2');
run;
Code:
data test2;
set test (where= (textnumber in:('1','2'));
run;
Code:
data test2(where= (textnumber in:('1','2'));
set test;
run;
However, it appears that such is not the case in PROC SQL. In the 2 codes below, only the second one works.
Code:
proc sql;
create table test2 as
select *
from test
where textnumber in:('1','2')
;
quit;
Code:
proc sql;
create table test2 as
select *
from test
(where=(textnumber in:('1','2')))
;
quit;
Am I correct? And if so, why is that????
Finally, how do you make this code work:
Code:
proc sql;
create table test2 as
select *
from test (where=(textnumber in:(select longtextnumber from test0 where longtextnumber ne ' ')))
;
quit;