<?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: Rollback Issue: How to fix ORACLE execute error: ORA-00001 in SAS EG in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Rollback-Issue-How-to-fix-ORACLE-execute-error-ORA-00001-in-SAS/m-p/827289#M326785</link>
    <description>Found it by recreating the target Oracle table so the constraint will be removed (good as temporarily dropping the constraint) then I checked the merged version for the duplicates. Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt; &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;</description>
    <pubDate>Fri, 05 Aug 2022 04:00:07 GMT</pubDate>
    <dc:creator>meatballs12345</dc:creator>
    <dc:date>2022-08-05T04:00:07Z</dc:date>
    <item>
      <title>Rollback Issue: How to fix ORACLE execute error: ORA-00001 in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rollback-Issue-How-to-fix-ORACLE-execute-error-ORA-00001-in-SAS/m-p/827283#M326782</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently running a specific job and it appends update on an Oracle table. Here's the part of code where&lt;/P&gt;&lt;P&gt;the error occurs:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;%let etls_lastTable = &amp;amp;work.mapped; &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;/*---- Update master table ----*/ &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;%put %str(NOTE: Updating table ...);&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;data XXXDWH.XX_XX_XX; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;modify XXXDWH.XX_XX_XX &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;amp;etls_lastTable&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;updatemode = nomissingcheck ; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;by FI_SRC_CD;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;/* if the record does not exist in the master, then add it */ &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;if %sysrc(_DSENMR) eq _iorc_ then &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;output;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;/* if the record exists in the master, then replace it */ &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;else if %sysrc(_SOK) eq _iorc_ then &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;replace;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;_iorc_ = 0; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;_error_ = 0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the error:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Updating table ...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ERROR: ORACLE execute error: ORA-00001: unique constraint (DWHXXX.XX_XX_PK) violated.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: There were 1 observations read from the data set XXXDWH.XX_XX_XX.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The data set XXXDWH.XX_XX_XX has been updated. There were 3992 observations rewritten, 27 observations added and 0 &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;observations deleted.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: There were 1 rejected updates, 0 rejected adds, and 0 rejected deletes.&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ERROR: ROLLBACK issued due to errors for data set XXXDWH.XX_XX_XX.DATA.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table to be appended came from merged source tables. Now, I'm not so familiar with this kind of issues but as per Googling, it says that it has something to do with the unique keys and so I tried checking if there are any duplicates on the table to be appended on the Oracle table and found nothing. Any idea on how can I resolve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really thankful for this community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 02:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rollback-Issue-How-to-fix-ORACLE-execute-error-ORA-00001-in-SAS/m-p/827283#M326782</guid>
      <dc:creator>meatballs12345</dc:creator>
      <dc:date>2022-08-05T02:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Rollback Issue: How to fix ORACLE execute error: ORA-00001 in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rollback-Issue-How-to-fix-ORACLE-execute-error-ORA-00001-in-SAS/m-p/827288#M326784</link>
      <description>&lt;P&gt;You need to find out what that unique constraint is. It could be that you are trying to to add a key value that must also be added to another Oracle table as well. If you don't know how to get the definition of an Oracle constraint, ask one of your Oracle DBAs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also modify your code to separately collect rejected rows so you have a better idea of what the offending key values are. In your case only one row is rejected.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 03:36:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rollback-Issue-How-to-fix-ORACLE-execute-error-ORA-00001-in-SAS/m-p/827288#M326784</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-05T03:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rollback Issue: How to fix ORACLE execute error: ORA-00001 in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rollback-Issue-How-to-fix-ORACLE-execute-error-ORA-00001-in-SAS/m-p/827289#M326785</link>
      <description>Found it by recreating the target Oracle table so the constraint will be removed (good as temporarily dropping the constraint) then I checked the merged version for the duplicates. Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt; &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;</description>
      <pubDate>Fri, 05 Aug 2022 04:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rollback-Issue-How-to-fix-ORACLE-execute-error-ORA-00001-in-SAS/m-p/827289#M326785</guid>
      <dc:creator>meatballs12345</dc:creator>
      <dc:date>2022-08-05T04:00:07Z</dc:date>
    </item>
  </channel>
</rss>

