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.
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.