<?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 Constraints Removed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275265#M55025</link>
    <description>&lt;P&gt;I have added constraints into a table but it removes it when someone overwrites the table. Is there any way to prevent it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA TEMP;
SET SASHELP.CLASS;
RUN;

PROC SQL;
ALTER TABLE TEMP
ADD CONSTRAINT NOT_NULL_WEIGHT NOT NULL(WEIGHT);
QUIT;

DATA TEMP;
SET TEMP;
IF AGE &amp;gt;=15 THEN WEIGHT = .;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 05 Jun 2016 20:36:17 GMT</pubDate>
    <dc:creator>Ujjawal</dc:creator>
    <dc:date>2016-06-05T20:36:17Z</dc:date>
    <item>
      <title>Constraints Removed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275265#M55025</link>
      <description>&lt;P&gt;I have added constraints into a table but it removes it when someone overwrites the table. Is there any way to prevent it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA TEMP;
SET SASHELP.CLASS;
RUN;

PROC SQL;
ALTER TABLE TEMP
ADD CONSTRAINT NOT_NULL_WEIGHT NOT NULL(WEIGHT);
QUIT;

DATA TEMP;
SET TEMP;
IF AGE &amp;gt;=15 THEN WEIGHT = .;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2016 20:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275265#M55025</guid>
      <dc:creator>Ujjawal</dc:creator>
      <dc:date>2016-06-05T20:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints Removed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275267#M55026</link>
      <description>&lt;P&gt;Constraints are kept and respected if you stay within SQL. Try&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;update temp&lt;BR /&gt;set weight = .&lt;BR /&gt;where age &amp;gt;= 15;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2016 21:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275267#M55026</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-05T21:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints Removed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275285#M55031</link>
      <description>&lt;P&gt;Use MODIFY if you want to retain the constraint. But note that&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;DATA TEMP;&lt;BR /&gt;modify TEMP;&lt;BR /&gt;IF AGE &amp;gt;=15 THEN WEIGHT = .;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is not equivalent to the SQL UPDATE query above. There is no rollback with MODIFY.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 02:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275285#M55031</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-06T02:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Constraints Removed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275289#M55033</link>
      <description>&lt;P&gt;Add a password in this table to avoid to rewrite it .&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;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA TEMP(pw=aw12);
SET SASHELP.CLASS;
RUN;

data temp;
 set sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2016 02:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Constraints-Removed/m-p/275289#M55033</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-06T02:49:01Z</dc:date>
    </item>
  </channel>
</rss>

