<?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: SAS table insert into Oracle by Data Step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-table-insert-into-Oracle-by-Data-Step/m-p/301001#M63647</link>
    <description>Thank you very much for your help.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;George</description>
    <pubDate>Tue, 27 Sep 2016 11:38:50 GMT</pubDate>
    <dc:creator>sorosch</dc:creator>
    <dc:date>2016-09-27T11:38:50Z</dc:date>
    <item>
      <title>SAS table insert into Oracle by Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-table-insert-into-Oracle-by-Data-Step/m-p/300613#M63506</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;i want to insert a SAS Table into Oracle. Normally i use PROC SQL. But in this case i must recode or query every row in the SAS table - and after this the row should be inserted or not in Oracle.&lt;BR /&gt;&lt;BR /&gt;This i want to do (with pseudo-code):&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;read until sas_base_table is EOF&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; "recode/do something with" the sas_base_row&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; if sas_base_row is a hit then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; insert into oracle_table&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DO NOTHING&lt;BR /&gt;&amp;nbsp; end if&lt;BR /&gt;&lt;BR /&gt;end read&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How can i do that? Is there somewhere perhabs an example?&lt;BR /&gt;&lt;BR /&gt;Thank you very much&lt;BR /&gt;Best regards&lt;BR /&gt;George&lt;/P&gt;</description>
      <pubDate>Sun, 25 Sep 2016 13:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-table-insert-into-Oracle-by-Data-Step/m-p/300613#M63506</guid>
      <dc:creator>sorosch</dc:creator>
      <dc:date>2016-09-25T13:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS table insert into Oracle by Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-table-insert-into-Oracle-by-Data-Step/m-p/300618#M63509</link>
      <description>&lt;P&gt;Why ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to write to Oracle using a data step then make a libref that points to your Oracel schema.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname MYDB oracle .... ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Generate the rows you want to insert. For example you could use a conditional OUTPUT statement in your data step to select the rows to insert.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data toadd ;
  set ....
  if ... then output;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then insert them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append base=mydb.mytable data=toadd force;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Sep 2016 15:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-table-insert-into-Oracle-by-Data-Step/m-p/300618#M63509</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-09-25T15:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS table insert into Oracle by Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-table-insert-into-Oracle-by-Data-Step/m-p/301001#M63647</link>
      <description>Thank you very much for your help.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;George</description>
      <pubDate>Tue, 27 Sep 2016 11:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-table-insert-into-Oracle-by-Data-Step/m-p/301001#M63647</guid>
      <dc:creator>sorosch</dc:creator>
      <dc:date>2016-09-27T11:38:50Z</dc:date>
    </item>
  </channel>
</rss>

