<?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: PROC APPEND - Warning related to Integrity Constraint in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-APPEND-Warning-related-to-Integrity-Constraint/m-p/432905#M68758</link>
    <description>&lt;P&gt;The reason is clear: you are violating the PK by adding those rows.&lt;BR /&gt;If the PK is relevant you need to change your update approach. Like decide whether you only wish to add records for new keys, or update rows with a key match.&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2018 20:46:23 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2018-01-31T20:46:23Z</dc:date>
    <item>
      <title>PROC APPEND - Warning related to Integrity Constraint</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-APPEND-Warning-related-to-Integrity-Constraint/m-p/432704#M68736</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Getting below warning message while running a PROC APPEND step to append a WORK.DST_A_WRK to PRMLB.DST_A.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT size="2"&gt;PROC APPEND BASE = PRMLB.DST_A &lt;BR /&gt;            DATA = WORK.DST_A_WRK ;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;WARNING: Add/Update failed for data set PRMLB.DST_A because data value(s) do not comply with integrity constraint PK_COL1, 999 observations rejected&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;PK_COL1 is a primary constraint defined on managed ID key field COL1 (Numeric)&amp;nbsp;in the table PRMLB.DST_A. First run went fine as it was first time the dataset PRMLB.DST_A getting loaded. Getting above warning message during the second run.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;DST_A has around 16 variables (COL1&amp;nbsp;- COL16).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Statement used to create integrity constraint is as below&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;CONSTRAINT PK_COL1 PRIMARY KEY (COL1) &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Dataset WORK.DST_A_WRK used in PROC APPEND has difference in number of observations than PRMLB.DST_A&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;I have gone through link &lt;A href="http://support.sas.com/kb/38/162.html" target="_blank"&gt;http://support.sas.com/kb/38/162.html&lt;/A&gt; but it mentions about order of many integrity constraints causing above warning, in my case I just have one integrity constraint PK_COL1.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Could someone please help me with what may be the reasons?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 13:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-APPEND-Warning-related-to-Integrity-Constraint/m-p/432704#M68736</guid>
      <dc:creator>nrk1787db1</dc:creator>
      <dc:date>2018-01-31T13:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC APPEND - Warning related to Integrity Constraint</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-APPEND-Warning-related-to-Integrity-Constraint/m-p/432743#M68737</link>
      <description>&lt;P&gt;Can you delete that IC ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc datasets lib=.........&lt;/P&gt;
&lt;P&gt;modify DST_A;&lt;/P&gt;
&lt;P&gt;ic delete&amp;nbsp;&lt;SPAN&gt;PK_COL1;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 14:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-APPEND-Warning-related-to-Integrity-Constraint/m-p/432743#M68737</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-01-31T14:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROC APPEND - Warning related to Integrity Constraint</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-APPEND-Warning-related-to-Integrity-Constraint/m-p/432905#M68758</link>
      <description>&lt;P&gt;The reason is clear: you are violating the PK by adding those rows.&lt;BR /&gt;If the PK is relevant you need to change your update approach. Like decide whether you only wish to add records for new keys, or update rows with a key match.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 20:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-APPEND-Warning-related-to-Integrity-Constraint/m-p/432905#M68758</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-01-31T20:46:23Z</dc:date>
    </item>
  </channel>
</rss>

