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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: