<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: store SAS table data to oracle database in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/store-SAS-table-data-to-oracle-database/m-p/672969#M36561</link>
    <description>&lt;P&gt;I find deleting rows via SQL passthru is efficient:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   connect to Oracle ( &amp;lt;Oracle connection details&amp;gt; ); 
   execute (delete from MyOracleDatabase.MyOracleSchema.MyOracleTable
           ) by Oracle;
   disconnect from Oracle;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname MyOracle Oracle &amp;lt;Oracle connection details&amp;gt; insertbuff = 10000;
proc datasets library = MyOracle nolist;
  append base = MyOracleTable data = MySASLib.MySASTable;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Jul 2020 20:52:04 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2020-07-28T20:52:04Z</dc:date>
    <item>
      <title>store SAS table data to oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/store-SAS-table-data-to-oracle-database/m-p/672931#M36556</link>
      <description>&lt;P&gt;Hello, experts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 17:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/store-SAS-table-data-to-oracle-database/m-p/672931#M36556</guid>
      <dc:creator>Jonison</dc:creator>
      <dc:date>2020-07-28T17:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: store SAS table data to oracle database</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/store-SAS-table-data-to-oracle-database/m-p/672969#M36561</link>
      <description>&lt;P&gt;I find deleting rows via SQL passthru is efficient:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   connect to Oracle ( &amp;lt;Oracle connection details&amp;gt; ); 
   execute (delete from MyOracleDatabase.MyOracleSchema.MyOracleTable
           ) by Oracle;
   disconnect from Oracle;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname MyOracle Oracle &amp;lt;Oracle connection details&amp;gt; insertbuff = 10000;
proc datasets library = MyOracle nolist;
  append base = MyOracleTable data = MySASLib.MySASTable;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jul 2020 20:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/store-SAS-table-data-to-oracle-database/m-p/672969#M36561</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-07-28T20:52:04Z</dc:date>
    </item>
  </channel>
</rss>

