BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying to extract Oracle data but when I use a subquery as a list as follows -

proc sql;
&connect;
create TABLE /*RF300L1.*/D_FAB300_edc_collected1 as
select * from connection to ORACLE
(select * from edc_collected_data
where COL_INS_ID in
(select col_ins_id from Notfound_in_edc_collected));
disconnect from ORACLE;
quit;

but I recieve the following error-

ERROR: ORACLE prepare error: ORA-00942: table or view does not exist. SQL statement: select * from edc_collected_data where COL_INS_ID in (select col_ins_id from Notfound_in_edc_collected)
5 REPLIES 5
art297
Opal | Level 21
Have you checked to ensure that those are the correct file names? I found it surprising that one ended with _data, while the other didn't.

Art
advoss
Quartz | Level 8
Are both tables, edc_collected_data and Notfound_in_edc_collected, Oracle tables, or is one of them a SAS table? In this query, they must both be Oracle tables.
deleted_user
Not applicable
Thanks advoss! I think that my answer the one in the subquery is a SAS table..

sorry checking my threads after a long long tme..
Ksharp
Super User
Hi.
It looks like you are using proc sql 's Pass-Through capability.
Do you try to use libname statement?


Ksharp
hellind
Quartz | Level 8

I tried to use the LIBNAME statement before trying the Pass-Through SQL. Thanks for Google and you. I removed the LIBNAME statement from the Pass_Through and it worked.Smiley Happy

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
  • 5 replies
  • 1809 views
  • 1 like
  • 5 in conversation