Hi, I'm trying to define a variable list for a proc sql command rather than type each instance out. For example, here's the code breaking out each variable into its own table: proc sql; create table remi.Emp as select subregion_ID, year, emp from remi.remisas where emp is not missing order by subregion_ID, year; create table remi.r111 as select subregion_ID, year, r111 from remi.remisas where r111 is not missing order by subregion_ID, year; create table remi.r113 as select subregion_ID, year, r113 from remi.remisas where r113 is not missing order by subregion_ID, year; quit; I would like to have something more efficient lwould give me the same output as above, but I keep getting errors on this code: %let var_list= emp r111 r113 proc sql; create table remi."&var_list" as select subregion_id, year, "&var_list" from remi.remisas where "&var_list" is not missing order by subregion_id, year; quit; Thanks in advance for any help!
... View more