【发布时间】:2016-10-29 04:26:15
【问题描述】:
如何在 SAS 中的 PROC SQL 中使用名称中带有空格的列(“库名称”)?
proc sql outobs=10;
select *
from sashelp.vtable
where library name = xxx
;
run;
我试过了:
proc sql outobs=10;
select *
from sashelp.vtable
where 'Libname'n = test_lin;
quit;
proc sql outobs=10;
select *
from sashelp.vtable
where 'library name'n = test_lin;
quit;
proc sql outobs=10;
select *
from sashelp.vtable
where libname = test_lin;
quit;
错误:在贡献中未找到以下列 表:test_lin。
变量名:libname
变量标签:Library Name
【问题讨论】:
-
试试
where libname = test_lin:libname不需要 SAS 名称文字。'Libname'n使其区分大小写。 -
看起来
test_lin是一个变量。你把它放在这里就像只是另一个列名。 -
是的,其中 libname = 'TEST_LIN' 有效!