I have the following libname which connects to an SQL Server via OBDC;
libname servdat odbc dsn="MyODBC" uid=dbid pwd=pass ;
The tables on this server all have a period in their name, for example a.cus_data
The SQL is falling over as I belive that it sees this as a multi-level connection string.
proc sql ;
select *
from servdat.a.cus_data
;
quit ;
Is there a way I can get this to work?
Thanks in advance for any help.
Paul.
One way to do it is to convert the program to pass-thru SQL instead of using the libname approach.
One way to do it is to convert the program to pass-thru SQL instead of using the libname approach.
Thanks Doc. This does the job nicely.
proc sql;
connect to odbc(user=myodbc password=mypass dsn="MYODBC");
create table outdat as
select * from connection to odbc
(select * from a.cus_data);
quit;
There is an option preserve_tab_names= . and Did you try 'a.cus_data'n this literal table name?
Ksharp
did you try the owner= option
for SQL Server it is usually dbo
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.