I have the following code:
proc sql;
select distinct "'" || strip(code) || "'" into :process separated by "," from tbl1 where code_type="A";
create table temp as select * from tbl1 where code in ('&process');
quit;
the above generates a list from the macro variable that matches my expectation. however, temp table generated is blank. what am i missing here? the reason i'm approaching this way is because I need to pass &process to a data step:
data want1 want2;
set have;
if code in ("&process") then output want1;
run;
I rather not have to rewrite the existing code, so thought this would be a quick approach
... View more