我用谷歌搜索了几天,但是无法正常工作.
我正在使用SQL 2014和adventureworks数据库.
我有SAS 9.3.
我尝试了不同的ODBC设置,如设置默认数据库,使用Windows登录或SQL登录.不同的司机.仍然没有,使用完整和noprompt:
libname mylib odbc complete='TrustedConnection=True;DSN=test2;SERVER=MYSERVER\SQLEXPRESS;DATABASE=AdventureWorks2012;'stringdates=yes;
proc print data=mylib.Person;
错误信息:
NOTE: Libref MYLIB was successfully assigned as follows:
Engine: ODBC
Physical Name: test2
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.
Inserting white space between a quoted string and the succeeding identifier is
recommended.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 5.48 seconds
cpu time 0.34 seconds
700 proc print data=mylib.Person;
ERROR: File MYLIB.Person.DATA does not exist
我已尝试使用Person.Person以及使用schema = Person的连接字符串.
但是,如果我使用以下它可以工作.我把默认数据库放在ODBC中:
proc sql;
connect to odbc as mycon
(required = "dsn=awlt32;uid=sa;password=mypassword");
select *
from connection to mycon
(select *
from Person.Person);
disconnect from mycon;
quit;
我知道这是一个非常简单的问题,但无论我找到什么样的代码,我似乎都无法使它工作.提前致谢.