Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Multiple SQL queries in SAS

Status
Not open for further replies.

GenH

Technical User
May 16, 2012
1
US
Hi Everyone. Let me preface this by saying that my SAS knowledge is around the medium level. I have around 60 queries that I need to have run at different scheduled times. I am having no issues with the batch submission. My problem is with calling the queries. I am using the following code:

x setenv ORACLE_SID PROD;
x setenv TWO_TASK PROD;

Proc sql;
connect to oracle as squery1 (user= orapw=);
create table BRPF_01 as
select *
from connection to squery1

( ***Insert***);
disconnect from squery1;
quit;

Ideally, what I would like is for this code to execute, but where it says ***Insert*** it would call the queries that I need to run. I was attempting to use %include, but I was unable to get that to run within the Proc SQL. Is there another way? Or a way to get it to call all the scripts within a certain folder?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top