Hi,
I would like to ask for assistance regarding SQL Pass-Through facility in SAS EG. I have never used this function in the past, and would like to inquire on how to retrieve the query results and be able to save as SAS dataset so I can use in data step task. I was able to successfully connect to our DBMS using the sample proc sql statement I created below, however, when I tried to create a SAS dataset from the query results , i am getting an error ,saying that the table I created from the pass -through query is not found. Appreciate any assistance. Thank you in advance.
proc sql;
connect to Oracle as mydata(path= path connection = global connection_group ="Con_Group" user = 'myuser' password='mypass');
create table Query_Results as
select * from Connection to mydata
(select *
from Oracle_MBR_Table
where mbr_group_id ='12345';
disconnect from mydata;
quit;
data want;
set Query_Results;
run;
You may want to show us code that actually runs. The PROC SQL has unmatched parentheses [The "(" before "select" does not have a matching ")".]
You may want to show us code that actually runs. The PROC SQL has unmatched parentheses [The "(" before "select" does not have a matching ")".]
My apologies .. and thank you so much. I was so intimidated by the SQL pass- through syntax and overlooked the missing parenthesis . I can now see the results. Appreciate it!
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.
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.