<?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: How to use oracle sequence while insert/update in SAS DI 4.8 in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204094#M4532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Linus. So if you select that option , how does it read the sequence from SQL server. Just for knowledge sake.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 May 2015 14:21:04 GMT</pubDate>
    <dc:creator>etl_tool</dc:creator>
    <dc:date>2015-05-07T14:21:04Z</dc:date>
    <item>
      <title>How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204089#M4527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm joining a sybase table and a sas data set to insert/update data using a table loader in oracle. The table ID needs to be loaded using a sequence which resides in oracle. &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Can you please let me know how to use an oracle sequence to generate a ID column? I tried adding a dummy column to the same oracle table joined it to the result set and tried specifying seqname.nextval in a expression editor but getting an error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; ERROR: Unresolved reference to table/correlation name seqname. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 02:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204089#M4527</guid>
      <dc:creator>etl_tool</dc:creator>
      <dc:date>2015-04-26T02:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204090#M4528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;The approach I would take:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;- Join the Sybase &amp;amp; SAS table creating a SAS WORK table.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;- Bulk-load this SAS Work table into an Oracle staging table (either a global temporary table or simply a new Oracle table).&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - What I would do: First drop the staging table (just in case) using Proc Datasets with NOLIST NOWARN, then create the table using explicit SQL pass-through, then bulk-load into the table using a table loader.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;- Load the Oracle staging table into the existing target Oracle table using pass-through SQL (the SQL EXECUTE transformation). &lt;A href="http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables004.htm#ADMIN11635" title="http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables004.htm#ADMIN11635"&gt;Loading Tables&lt;/A&gt; &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;- Drop the staging table (using Proc Datasets).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 21:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204090#M4528</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-04-26T21:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204091#M4529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks partick. So there is no easy way to do it using just SAS Datasets and transformations? We can do that easily using other ETL tools like talend and Informatica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 02:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204091#M4529</guid>
      <dc:creator>etl_tool</dc:creator>
      <dc:date>2015-04-27T02:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204092#M4530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took an approach of creating staging tables and then inserting or updating using SQL execute transformation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 13:02:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204092#M4530</guid>
      <dc:creator>etl_tool</dc:creator>
      <dc:date>2015-05-07T13:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204093#M4531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the IGNORE_READ_ONLY_COLUMNS libname option when we had a similar issue with SQL Server.&lt;/P&gt;&lt;P&gt;But unfortunately, it's available on all DBMS ACCESS &lt;EM&gt;except&lt;/EM&gt; Oracle... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 13:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204093#M4531</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-05-07T13:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204094#M4532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Linus. So if you select that option , how does it read the sequence from SQL server. Just for knowledge sake.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 14:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204094#M4532</guid>
      <dc:creator>etl_tool</dc:creator>
      <dc:date>2015-05-07T14:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204095#M4533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I recall it, when we did a append /insert libname style it ignored the seq Id column (which was defined with a automatic constraint ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 05:39:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204095#M4533</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-05-08T05:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use oracle sequence while insert/update in SAS DI 4.8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204096#M4534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the approach I would have taken as well because it allows you to bulk-load into the staging table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've played now a bit with the sequence object so here the options I found working:&lt;/P&gt;&lt;P&gt;- Fully implement the sequencing in the database by using a before insert trigger. If done so then even a proc append works (you need to set options nowarn/force as you won't pass in the key field from source).&lt;/P&gt;&lt;P&gt;- Use pass-through SQL as you've done it.&lt;/P&gt;&lt;P&gt;- Query the sequence object from within SAS to retrieve the current value for LAST_NUMBER, then increment the key within SAS and populate the key field on the source side, then ALTER the sequence object to set LAST_NAME to the new key value - and load the source table into Oracle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 May 2015 04:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-use-oracle-sequence-while-insert-update-in-SAS-DI-4-8/m-p/204096#M4534</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-05-10T04:54:02Z</dc:date>
    </item>
  </channel>
</rss>

