开发者

Fully Qualified Names from SQL Server in SAS

I need to be able to spec开发者_JAVA百科ify the schema that I want to access in SAS. I have used a connection string with the following schema=?? but SAS will not let me select or print the contents of any object in the named schema. Has anyone been able to write a PROC SQL statement selecting objects in a schema other than dbo?

Thank you,


SAS does not use fully quallified names from the SQL server but you can direct SAS to a specific schema. The following is an example that uses a libname as connection to a 2008 SQL Server.

proc print data=myDBconn.v_Lots (SCHEMA=SAS);
   WHERE Study_ID IS NOT NULL;
run;

proc print data=myDBconn.Drugs (SCHEMA=Pharmacy);
   where _drug_id=1;
run;

proc sql;
   create table myTest.drugs as ;
   (SELECT * FROM myDbconn.drugs (SCHEMA=Pharmacy));
quit;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜