在SAS中,有没有办法使用除一个变量之外的所有变量进行排序?

时间:2013-05-29 02:03:17

标签: sorting sas

我已经彻底研究过,但似乎无法使用PROC SQLPROC SORT轻松完成此操作。

目前,我必须列出除了我不想要的变量之外的所有变量,这相当繁琐,因为我的表包含50个变量。有没有人有任何建议?

1 个答案:

答案 0 :(得分:7)


proc sql;
    select name into :columns separated by ' ' from dictionary.columns 
where libname = 'LIB' and memname = 'TABLE' and name ne 'COLUMN_TO_BE_EXCLUDED';
quit;

proc sort
   data = lib.table;
    by &columns; 
run;

相关问题