05-15-2016 07:55 PM
I am trying to create a macro variable using Proc SQL and store it in a table. but I am getting the above warning
WARNING: INTO clause is ignored in the CREATE TABLE statement.
create table t as select count(*) as c into :car from sashelp.cars;
any help would be appreciated.
05-15-2016 08:17 PM
You can either create a macro or store it into a table, not both in a PROC SQL step.
You can use two separate steps but it doesn't make a lot of sense given your current query, since you have a single value which is accessible in the macro variable.
proc sql noprint; create table t as select count(*) as c from sashelp.cars; select c into :car from t; quit;