Iam trying to connect to sql server from sas and iam able to connect with libname statement successfully but not from the proc sql.
what might be the wrong in the below code?
LIBNAME genis SQLSVR Datasrc=Genesis_ABC SCHEMA=dbo USER="XXXX" PASSWORD="XXXX";
Working Properly
proc sql;
connect to odbc as mycon ( Datasrc=Genesis_ABC SCHEMA=dbo USER="XXXX" PASSWORD="XXXX");
create table work.TEST1 as
select * from connection to mycon
(select * from test1_table );
disconnect from mycon;
quit;
proc sql getting below error
ERROR: The ODBC engine cannot be found.
ERROR: A Connection to the odbc DBMS is not currently supported, or is not installed at your site.
Try changing your CONNECT TO statement:
connect to SQLSVR as mycon ( Datasrc=Genesis_ABC SCHEMA=dbo USER="XXXX" PASSWORD="XXXX");
are there missing quotes
connect to odbc as mycon ( Datasrc='Genesis_ABC' SCHEMA=dbo USER="XXXX" PASSWORD="XXXX");
I tried with single quote and double quote..still getting same error
Try changing your CONNECT TO statement:
connect to SQLSVR as mycon ( Datasrc=Genesis_ABC SCHEMA=dbo USER="XXXX" PASSWORD="XXXX");
Awesome--working fine after changing to SQLSVR
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.