BookmarkSubscribeRSS Feed
Jonison
Fluorite | Level 6

Hello, experts.

 

I have established a model in enterprise guide, and the model results are stored in SAS table. IT create a table in Oracle space with same structure of model results (col names, length etc are same).

 

would you please provide some suggestions on how to load the data from SAS table to Oracle table? (truncate existing records in Oracle data table first).

 

Many thanks.

 

 

 

1 REPLY 1
SASKiwi
PROC Star

I find deleting rows via SQL passthru is efficient:

proc sql;
   connect to Oracle ( <Oracle connection details> ); 
   execute (delete from MyOracleDatabase.MyOracleSchema.MyOracleTable
           ) by Oracle;
   disconnect from Oracle;
quit;

I also find PROC DATASETS APPEND is good for loading data, but you normally need to tweak the INSERTBUFF = option to get good loading performance:

libname MyOracle Oracle <Oracle connection details> insertbuff = 10000;
proc datasets library = MyOracle nolist;
  append base = MyOracleTable data = MySASLib.MySASTable;
run;
quit;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 509 views
  • 0 likes
  • 2 in conversation