<?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: Trigger on A-table (versioned gdb) wont update (SQL server) in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878559#M6638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Biraja, I know this is not a recommended work flow I reviewed&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/thread/174497#comment-597453"&gt;https://community.esri.com/thread/174497#comment-597453&lt;/A&gt;. Are you saying I should set the triggers on the _evw? I thought you couldnt set triggers there other than the native ones (e.g. v229_delete, v229_insert and v229_update) created when you version?&amp;nbsp;&amp;nbsp;So would I write the code to set the trigger as follows:&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;ON [dbo].[building_evw] which is the _evw table (a225 is the adds table) for the Building feature class?&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Wendy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 May 2019 15:54:29 GMT</pubDate>
    <dc:creator>WendyBerelson</dc:creator>
    <dc:date>2019-05-30T15:54:29Z</dc:date>
    <item>
      <title>Trigger on A-table (versioned gdb) wont update (SQL server)</title>
      <link>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878557#M6636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a versioned GDB (SQL server) and set a trigger on A-table that is supposed to update a second A-table when a change (insert, update) is made.&amp;nbsp; I can see that the change is in the A-table (a225) where the trigger is set, but it doesnt seem to fire and make the change to a229. &amp;nbsp;I am editing on DEFAULT. Note I just added in "INSERT" to the AFTER UPDATE line. &amp;nbsp;I am actually altering code that I didnt write that is supposed to work on a non-versioned&amp;nbsp;gdb&amp;nbsp;but I need to replicate the database so had to version it and w/replication cant use move edits to base. So now have to rewrite the code to hit the a-tables. I dont think I'm supposed to set triggers on the _evw? This is all new to me so I appreciate any help/tips.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USE [UWADMINGIS_INVISION]&lt;BR /&gt;GO&lt;BR /&gt;/****** Object: Trigger [dbo].[Building_Update_SHORTNAME_trg] Script Date: 5/29/2019 11:09:41 AM ******/&lt;BR /&gt;SET ANSI_NULLS ON&lt;BR /&gt;GO&lt;BR /&gt;SET QUOTED_IDENTIFIER ON&lt;BR /&gt;GO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALTER TRIGGER [dbo].[Building_Update_SHORTNAME_trg]&lt;BR /&gt;ON [dbo].[a225]&lt;BR /&gt;AFTER INSERT, UPDATE&lt;BR /&gt;AS&lt;BR /&gt;IF UPDATE (SHORTNAME)&lt;BR /&gt;BEGIN&lt;/P&gt;&lt;P&gt;UPDATE [dbo].[a229]&lt;BR /&gt;SET UW_Building_Name = BUILDING.SHORTNAME&lt;BR /&gt;FROM [dbo].[a229] f&lt;BR /&gt;LEFT OUTER JOIN (SELECT DISTINCT LOCATION_CODE FROM inserted) i ON f.Location_Code = i.LOCATION_CODE&lt;BR /&gt;LEFT OUTER JOIN (&lt;BR /&gt; SELECT LOCATION_CODE,&lt;BR /&gt; SHORTNAME&lt;BR /&gt; FROM a225&lt;BR /&gt;) BUILDING on BUILDING.LOCATION_CODE = f.Location_Code&lt;BR /&gt;WHERE i.Location_code IS NOT NULL&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2019 18:36:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878557#M6636</guid>
      <dc:creator>WendyBerelson</dc:creator>
      <dc:date>2019-05-29T18:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger on A-table (versioned gdb) wont update (SQL server)</title>
      <link>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878558#M6637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wendy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modifying A table using SQL will corrupt the geodatabase and it is not recommended workflow.&lt;/P&gt;&lt;P&gt;If you want to modify the attributes using SQL then please use versioned view for that feature class in stead of A table on Default version or any other version you wanted to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Biraja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2019 23:50:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878558#M6637</guid>
      <dc:creator>BirajaNayak</dc:creator>
      <dc:date>2019-05-29T23:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger on A-table (versioned gdb) wont update (SQL server)</title>
      <link>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878559#M6638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Biraja, I know this is not a recommended work flow I reviewed&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/thread/174497#comment-597453"&gt;https://community.esri.com/thread/174497#comment-597453&lt;/A&gt;. Are you saying I should set the triggers on the _evw? I thought you couldnt set triggers there other than the native ones (e.g. v229_delete, v229_insert and v229_update) created when you version?&amp;nbsp;&amp;nbsp;So would I write the code to set the trigger as follows:&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;ON [dbo].[building_evw] which is the _evw table (a225 is the adds table) for the Building feature class?&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Wendy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 15:54:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878559#M6638</guid>
      <dc:creator>WendyBerelson</dc:creator>
      <dc:date>2019-05-30T15:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger on A-table (versioned gdb) wont update (SQL server)</title>
      <link>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878560#M6639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wendy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create enterprise geodatabase, default triggers are created with it and those are maintained by Esri application.&lt;/P&gt;&lt;P&gt;You can create your own triggers and validate or test in development environment first for any issues with your workflow caused by this triggers and you maintain it. As long as you are maintaining it on your own and not breaking your geodatabase workflow, you should be good&amp;nbsp; with the additional triggers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Biraja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2019 23:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/trigger-on-a-table-versioned-gdb-wont-update-sql/m-p/878560#M6639</guid>
      <dc:creator>BirajaNayak</dc:creator>
      <dc:date>2019-05-31T23:38:34Z</dc:date>
    </item>
  </channel>
</rss>

