<?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: Disallow Null Value field in existing data in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047796#M7142</link>
    <description>&lt;P&gt;The "{tablename}" and "{columnname}" and "{datatype}" need to be replaced with actual values, e.g.,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ALTER TABLE [EDIT_TEST] ALTER COLUMN [TEST] nvarchar({actualwidth}) NOT NULL&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;(Yes, you need to replace "{actualwidth}" with the defined width of the column).&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
    <pubDate>Thu, 15 Apr 2021 19:33:23 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2021-04-15T19:33:23Z</dc:date>
    <item>
      <title>Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046482#M7129</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have arcigis pro 2.7.2, arcmap 10.7.1, existing sde feature class, sql server.&lt;/P&gt;&lt;P&gt;Is there a way to disallow null values in field setting since it has existing data? Need to have one field that is required entry. It is not register as version. Please advise. Thank you.&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 17:35:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046482#M7129</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-04-13T17:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046542#M7130</link>
      <description>&lt;P&gt;For file geodatabases, I have only found that disallowing nulls can only be done at the time of field creation.&lt;/P&gt;&lt;P&gt;I am all for not allowing nulls as the default, but once allowed, I haven't found a way to revert it.&lt;/P&gt;&lt;P&gt;An earlier missive on the topic&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/the-solution-to-lt-null-gt-in-tables/ba-p/902845" target="_blank"&gt;The solution to &amp;lt;null&amp;gt; in tables - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 18:50:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046542#M7130</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-13T18:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046776#M7131</link>
      <description>&lt;P&gt;If you don't need to work with the tables in question in ArcMap (though you do have ArcMap listed...), you could define Constraint Attribute Rules.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/de/pro-app/latest/help/data/geodatabases/overview/an-overview-of-attribute-rules.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/de/pro-app/latest/help/data/geodatabases/overview/an-overview-of-attribute-rules.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Triggers: Insert, Update
// blocks the edit if the field NotNullable is empty
if(IsEmpty($feature.NotNullable)) {return False}
return True

// or in one line:
// return !IsEmpty($feature.NotNullable)&lt;/LI-CODE&gt;&lt;P&gt;You won't be able to open these tables in ArcMap. You can open views containing the data, though. So if you don't do edits in ArcMap, this could be a solution...&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 07:52:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046776#M7131</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-04-14T07:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046904#M7132</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp; Thank you for the information. But it is need to be editing. when an editor entry info, a field needs to be required to entry.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:05:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046904#M7132</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-04-14T14:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046944#M7133</link>
      <description>&lt;P&gt;You can't change the field to disallow Null values as long as there are entries in the table.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Delete all relationship classes your table is part of&lt;/LI&gt;&lt;LI&gt;Copy your table&lt;/LI&gt;&lt;LI&gt;Delete all rows from the table&lt;/LI&gt;&lt;LI&gt;Change your field(s), you can now disallow Null values&lt;/LI&gt;&lt;LI&gt;Edit the empty field values in the copy (or do it before step 1 in the original)&lt;/LI&gt;&lt;LI&gt;Copy all rows from the copy to the original&lt;/LI&gt;&lt;LI&gt;Delete the copy&lt;/LI&gt;&lt;LI&gt;Recreate all deleted relationship classes&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;!!! This will change ObjectID and GlobalID values of the table !!!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:34:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1046944#M7133</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-04-14T14:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047776#M7140</link>
      <description>&lt;P&gt;If the table is not versioned, you can use SQL to alter the column:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ALTER TABLE [{tablename}] ALTER COLUMN [{columnname}] {datatype} NOT NULL&lt;/LI-CODE&gt;&lt;P&gt;You should then open the table in the Catalog view as the table owner, to make sure the properties are correct, and populate the update to the sde.sde_column_registry table.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 19:06:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047776#M7140</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-04-15T19:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047784#M7141</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1060"&gt;@VinceAngelo&lt;/a&gt;&amp;nbsp;Thank you for the information. Please see screenshot. I got an incorrect.&lt;/P&gt;&lt;P&gt;Msg 102, Level 15, State 1, Line 1&lt;BR /&gt;Incorrect syntax near '{'.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__0-1618514016276.png" style="width: 652px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11033iA10E7AE65AE6E774/image-dimensions/652x152?v=v2" width="652" height="152" role="button" title="AlexP__0-1618514016276.png" alt="AlexP__0-1618514016276.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 19:14:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047784#M7141</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-04-15T19:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047796#M7142</link>
      <description>&lt;P&gt;The "{tablename}" and "{columnname}" and "{datatype}" need to be replaced with actual values, e.g.,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ALTER TABLE [EDIT_TEST] ALTER COLUMN [TEST] nvarchar({actualwidth}) NOT NULL&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;(Yes, you need to replace "{actualwidth}" with the defined width of the column).&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 19:33:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047796#M7142</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-04-15T19:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047797#M7143</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1060"&gt;@VinceAngelo&lt;/a&gt;&amp;nbsp;I got another error message. Please advise.&lt;/P&gt;&lt;P&gt;Msg 515, Level 16, State 2, Line 1&lt;BR /&gt;Cannot insert the value NULL into column 'TEST', table 'EDIT_TEST'; column does not allow nulls. UPDATE fails.&lt;BR /&gt;The statement has been terminated.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 19:41:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047797#M7143</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-04-15T19:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047800#M7144</link>
      <description>&lt;P&gt;You can only enforce NOT NULL on a column if the table doesn't have NULL values in that column.&lt;/P&gt;&lt;P&gt;You'll need to fix this first.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 19:44:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047800#M7144</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-04-15T19:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047801#M7145</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1060"&gt;@VinceAngelo&lt;/a&gt;&amp;nbsp;thank you for clarify. i don't have any data on that column. i recent checked..&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 19:47:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047801#M7145</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-04-15T19:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047807#M7146</link>
      <description>&lt;P&gt;If every row has a NULL value in that column, you certainly don't want to assert a NOT NULL on the column until the table has been updated so that only valid (non-NULL) values are present.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 20:02:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1047807#M7146</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-04-15T20:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1203158#M7825</link>
      <description>&lt;P&gt;...&amp;nbsp;and when I have versioned table? Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 09:00:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1203158#M7825</guid>
      <dc:creator>Dlouhyj</dc:creator>
      <dc:date>2022-08-16T09:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1208005#M7855</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1060"&gt;@VinceAngelo&lt;/a&gt;&amp;nbsp;Hi Vince, we've found this post quite interesting and have ran your query above and it seemed to work, however when we then check the table in catalog it is still set to allow null values. We then viewed the sde_column_registry table and can't see where the allow/not allow nulls is referenced? In screen shot it is the CreatedBy_temp field that we ran the ALTER TABLE query on.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AdminNCCMA_0-1661914867747.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49907i046895FC20890FD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AdminNCCMA_0-1661914867747.png" alt="AdminNCCMA_0-1661914867747.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 03:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1208005#M7855</guid>
      <dc:creator>AdminNCCMA</dc:creator>
      <dc:date>2022-08-31T03:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1208523#M7858</link>
      <description>&lt;P&gt;Changes made to the base table are not manifested to SDE table metadata immediately. You must first connect as the owner and describe the table (this can only be done as the owner).&lt;/P&gt;&lt;P&gt;You do not want to do this if the table is registered as versioned.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 01:12:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1208523#M7858</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2022-09-01T01:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Disallow Null Value field in existing data</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1278817#M8399</link>
      <description>&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;Can you describe the Describe process?&lt;/P&gt;&lt;P&gt;I've tried in the DB and in ArcGIS and it doesn't pick up the change in metadata.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 15:19:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disallow-null-value-field-in-existing-data/m-p/1278817#M8399</guid>
      <dc:creator>AndyEgleton</dc:creator>
      <dc:date>2023-04-14T15:19:58Z</dc:date>
    </item>
  </channel>
</rss>

