SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Get SYNONYMS via SAS/Access to ODBC

Accepted Solution Solved
Reply
Super Contributor
Posts: 336
Accepted Solution

Get SYNONYMS via SAS/Access to ODBC

[ Edited ]

Hello,

 

I would like to access the available synonyms via odbc.

 

If I use this code, I get the tables and views, but I can't find the synonyms:

 

Libname sqlserv ODBC Schema=DBO DSN=sassql;

Proc SQL;
  Create Table Work_Cont_Dict As Select * From Dictionary.Tables Where Libname eq UpCase('sqlserv');
Quit;

* proc datasets gives the same result - only views and tables;
Proc Datasets Library=sqlserv; 
  *Contents Out=Contents Data=_ALL_ Details; * if I remove the comment, it gives me an error;
Run;

 

 

 

How can I get a list of available synonyms?

 

Thanks&kind regards


Accepted Solutions
Solution
‎11-10-2015 09:10 AM
Super User
Posts: 5,257

Re: Get SYNONYMS via SAS/Access to ODBC

If I look through SAS/ACCESS doc, it seems there are only support for synonyms in Netezza and Oracle.

So my guess is that you nedd to use explicit SQL pass-thru to access those.

Data never sleeps

View solution in original post


All Replies
Solution
‎11-10-2015 09:10 AM
Super User
Posts: 5,257

Re: Get SYNONYMS via SAS/Access to ODBC

If I look through SAS/ACCESS doc, it seems there are only support for synonyms in Netezza and Oracle.

So my guess is that you nedd to use explicit SQL pass-thru to access those.

Data never sleeps
Super Contributor
Posts: 336

Re: Get SYNONYMS via SAS/Access to ODBC

Thanks. I needed something like:

 

Proc SQL NoPrint;
  Connect To ODBC (DSN=sassql);
  Create Table Synonyms As Select * From Connection To ODBC 
  (SELECT * FROM SYS.SYNONYMS) Order By name ;
  Disconnect From ODBC;
Quit;
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 381 views
  • 0 likes
  • 2 in conversation