In a SAS script I have a macro variable which is later used in an SQL in
statement in a PROC SQL step.
%let my_list = (1,2,3);
proc sql;
select *
from my_table
where var1 in &my_list.
;
quit;
This works fine, but I need some flexibility and also want to be able to select ALL lines without changing the SQL code itself, but just the macro variable.
Is there a trick to specifiy the macro variable so it selects ALL lines still using the IN operator? (avoiding a subquery solution that fills all possible values in the macro variable)