Hello Friends,
SAS 9.3
EG 5.1
SQL Server 2014
Windows 7
I am stuck with an issue when pulling the data from SQL through an ODBC connection. I am using the below code.
proc sql;
connect to odbc (&connectA);
create table test as
select * from
connection to odbc
(select * from [DB - Production].pri.test) ;
disconnect from odbc;
quit;
When I run the code it gives me the above error. When I investigated it there is a column in SQL that SAS doesn't like which is 'ABCDE' in (time(0), null) format. The rest of the columns are coming along fine.
What I should I do to pull this column along with others without erroring?
Thanks in advance for your help.
I see nothing in your query that calls for an explicit pass-thru.
Use a libname connection instead. If you still got problems, IMHO is that it's easier to trouble shoot.
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 25. 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.