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!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.