Hi,
Does SAS support any way to execute an external SQL script?
I have a dozen scripts, with 100's of statements that would require me to wrap each statement with EXECUTE( ) BY TERA to use with pass-through facility. I'm open to suggestions for ways I can use SAS to execute the scripts.
You could build the code as text, then run it
filename terasql temp;
data _null_;
length sqlStatement $2000;
infile ...;
input...;
/* Build SQL code here into */
file terasql;
put sqlStatement;
run;
proc sql;
connect to ...;
%include terasql;
quit;
Why not just ask the operating system to use BTEQ to run the script for you?
You can use the PIPE engine or one of the many commands that SAS has for running operating system commands.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.