It depends on how you've setup the "EReKA DB Sandbox" ODBC connection. If you've specified which database to connect then you don't need to specify the database, but you still have to tell it which schema to connect to, otherwise it will show as blank. libname AZsand ODBC DSN="EReKA DB Sandbox" schema=dbo; If you just specified "master" in the "EReKA DB Sandbox" odbc setup, then you'll have to specify the database i.e.: libname AZsand ODBC DSN="EReKA DB Sandbox" database = myDatabase schema=dbo; For your passthrough again depending on how the odbc is setup you might need to specify the database. Use the "%PUT &SQLXRC. &SQLXMSG. ;" so that you can see the error. PROC SQL NOPRINT; CONNECT TO ODBC ( DSN = "EREKA DB Sandbox" ); create table az_counts as select * from connection to odbc ( select ereka_model_seq,count(*) as counter from [myDatabase].[dbo].[ereka_model_data] group by ereka_model_seq ); %PUT &SQLXRC. &SQLXMSG. ; * SQL Server query return code and message; DISCONNECT FROM ODBC; QUIT; You can also create the ODBC credentials on the fly like below to test out how to connect directly to AZURE libname Azure odbc complete="driver={SQL Server Native Client 11.0}; uid=myUserID; pwd=myPassword; server=azureServer,port; database=myDatabse" schema=dbo; PROC SQL NOPRINT; CONNECT TO ODBC (complete="driver={SQL Server Native Client 11.0}; uid=myUserID; pwd=myPassword; server=azureServer,port; database=myDatabse" ); create table az_counts as select * from connection to odbc ( select ereka_model_seq,count(*) as counter from [myDatabase].[dbo].[ereka_model_data] group by ereka_model_seq ); %PUT &SQLXRC. &SQLXMSG. ; * SQL Server query return code and message; DISCONNECT FROM ODBC; QUIT;
... View more