04-02-2014 11:56 AM
I would like to know if I have a dataset with variables such as var1-var12, how can I use the select statement with these variables.
For example: Can I do something like select id, var: from dataset1? or I have to do select id, var1,var2, var3,.... var12 from dataset1
04-02-2014 12:00 PM
You have to explicitly list the variables for PROC SQL.
There are ways to simplify this.
You can select all with select *
or all from a table,
from sashelp.class as a
Or my lazy trick:
proc sql FEEDBACK;
from sashelp.class AS a;
And check the log for the list of variables, rather than type them out