BookmarkSubscribeRSS Feed
Scottcom4
Calcite | Level 5
Hi Guys,

At present we have SQL set up which allows us to access an Oracle DB via OLEDB (my understanding, but the code is attached to better explain). The thing is that I would like to establish a libname for this connect, so that I can see the tables contained within.

I have code to do this for a genuine Oracle connection, but can't get it to work in this instance.

Would anyone have any ideas on this?

Thank you in advance.

proc sql;
connect to oledb as oradb (User = XXXXXXXX Password = XXXXXX DataSource = XXXXXXXXXXXXX provider = MSDAORA.1);;
create table list_tab as
select * from connection to oradb
(select OWNER, TABLE_NAME from ALL_TABLES);
quit;
1 REPLY 1
Scottcom4
Calcite | Level 5
I have been looking on the internet for hours and didn't find anything about this issue, however 5 minutes after I posted this problem I located a SUGI containing the information I was after.

However, only 90% of the tables contain data. The 10% results in the folowing error message

[ERROR] Prepare error: ICommand Prepare::Prepare Failed. SQL Statement SELECT * From CBMRV_CLAIM.

I get a similar issue when attemtion to use SQL pass through using the SELECT *, however once (a very manual method of trawling through and adding one variable at a time) I remove the offending variable it works perfectly.

Does anyone have any ideas?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 603 views
  • 1 like
  • 1 in conversation