<?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>idea Prevent deletes in versioned feature classes in Data Management Ideas</title>
    <link>https://community.esri.com/t5/data-management-ideas/prevent-deletes-in-versioned-feature-classes/idi-p/940368</link>
    <description>&lt;P&gt;In unversioned feature classes, we can control privileges through Catalog for SELECT, INSERT, UPDATE, DELETE (using any combination).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, with versioned feature classes, we can only control INSERT, UPDATE, and DELETE as a group (all-or-nothing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can't allow INSERTS and UPDATES, yet prevent DELETES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be great if we could prevent just DELETES in versioned feature classes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 01:03:43 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2022-08-30T01:03:43Z</dc:date>
    <item>
      <title>Prevent deletes in versioned feature classes</title>
      <link>https://community.esri.com/t5/data-management-ideas/prevent-deletes-in-versioned-feature-classes/idi-p/940368</link>
      <description>&lt;P&gt;In unversioned feature classes, we can control privileges through Catalog for SELECT, INSERT, UPDATE, DELETE (using any combination).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, with versioned feature classes, we can only control INSERT, UPDATE, and DELETE as a group (all-or-nothing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can't allow INSERTS and UPDATES, yet prevent DELETES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be great if we could prevent just DELETES in versioned feature classes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 01:03:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/prevent-deletes-in-versioned-feature-classes/idi-p/940368</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-08-30T01:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent deletes in versioned feature classes</title>
      <link>https://community.esri.com/t5/data-management-ideas/prevent-deletes-in-versioned-feature-classes/idc-p/940369#M965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;CREATE OR REPLACE TRIGGER D202574_custom&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;BEFORE INSERT ON D202574&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;FOR EACH ROW&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;DECLARE &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; v_upd_row NUMBER;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;BEGIN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; SELECT COUNT(1) INTO v_upd_row &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; FROM A202574&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; WHERE objectid = :new.sde_deletes_row_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; AND sde_state_id = :new.deleted_at;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; IF v_upd_row = 0 THEN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; raise_application_error(-20001, 'Deleting has been disabled via a custom trigger.');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;&amp;nbsp; &amp;nbsp; END IF;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;END ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2020 17:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-ideas/prevent-deletes-in-versioned-feature-classes/idc-p/940369#M965</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2020-08-29T17:35:00Z</dc:date>
    </item>
  </channel>
</rss>

