<?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 Identifying changes using Geodatabase Archive Tables in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/identifying-changes-using-geodatabase-archive/m-p/470477#M18169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to identify changes to a versioned feature class since a given date. The feature class has archiving enabled and I have been looking at the documentation regarding this and have come up with the following queries which should enable detection of the deleted, modified and new features:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;--DELETED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;select OBJECTID, GDB_FROM_DATE, GDB_TO_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;from MYFC_H&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;lt;&amp;gt; '9999-12-31' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;gt; '2015-06-05 00:00' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; OBJECTID not in (select OBJECTID from MYFC_H where GDB_TO_DATE = '9999-12-31')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;--MODIFIED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;select OBJECTID, GDB_FROM_DATE, GDB_TO_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;from MYFC_H&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;lt;&amp;gt; '9999-12-31' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;gt; '2015-06-05 00:00' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; OBJECTID in (select OBJECTID from MYFC_H where GDB_TO_DATE = '9999-12-31')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;--NEW&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;select OBJECTID, GDB_FROM_DATE, GDB_TO_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;from MYFC_H&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE = '9999-12-31' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_FROM_DATE &amp;gt; '2015-06-05 00:00' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; OBJECTID not in (select OBJECTID from MYFC_H where GDB_TO_DATE &amp;lt;&amp;gt; '9999-12-31')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This appears to be working OK, based on some limited testing, but I was just wondering if anyone can verify the above or suggest a better way to do this using SQL (SQL Server) as I'm not sure the above is the most efficient SQL to achieve this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any input most welcome. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2015 17:14:16 GMT</pubDate>
    <dc:creator>JohnFannon</dc:creator>
    <dc:date>2015-06-05T17:14:16Z</dc:date>
    <item>
      <title>Identifying changes using Geodatabase Archive Tables</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/identifying-changes-using-geodatabase-archive/m-p/470477#M18169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to identify changes to a versioned feature class since a given date. The feature class has archiving enabled and I have been looking at the documentation regarding this and have come up with the following queries which should enable detection of the deleted, modified and new features:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;--DELETED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;select OBJECTID, GDB_FROM_DATE, GDB_TO_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;from MYFC_H&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;lt;&amp;gt; '9999-12-31' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;gt; '2015-06-05 00:00' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; OBJECTID not in (select OBJECTID from MYFC_H where GDB_TO_DATE = '9999-12-31')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;--MODIFIED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;select OBJECTID, GDB_FROM_DATE, GDB_TO_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;from MYFC_H&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;lt;&amp;gt; '9999-12-31' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE &amp;gt; '2015-06-05 00:00' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; OBJECTID in (select OBJECTID from MYFC_H where GDB_TO_DATE = '9999-12-31')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;--NEW&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;select OBJECTID, GDB_FROM_DATE, GDB_TO_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;from MYFC_H&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_TO_DATE = '9999-12-31' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; GDB_FROM_DATE &amp;gt; '2015-06-05 00:00' AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3334ca;"&gt;&amp;nbsp; OBJECTID not in (select OBJECTID from MYFC_H where GDB_TO_DATE &amp;lt;&amp;gt; '9999-12-31')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This appears to be working OK, based on some limited testing, but I was just wondering if anyone can verify the above or suggest a better way to do this using SQL (SQL Server) as I'm not sure the above is the most efficient SQL to achieve this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any input most welcome. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 17:14:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/identifying-changes-using-geodatabase-archive/m-p/470477#M18169</guid>
      <dc:creator>JohnFannon</dc:creator>
      <dc:date>2015-06-05T17:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying changes using Geodatabase Archive Tables</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/identifying-changes-using-geodatabase-archive/m-p/470478#M18170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enabling Archiving is indeed the correct way to access data on a time stamp level.&lt;/P&gt;&lt;P&gt;Right click on the Database Connection DEFAULT is Current, or you can give it a date.. then the connection takes place... all your featureclasses etc are actually being viewed by a View on the back end. e.g. table name OWNER would have a view OWNER_EVW.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Editing the view for example OWNER_EVW, runs the TRIGGERS to modify the 'raw' tables.&amp;nbsp; 9999 dates are current and actual dates are of those dates.&lt;/P&gt;&lt;P&gt;I use this technique for identifying changes of parcels within a time period. You can then also implement the time scaling in maps...etc etc.&lt;/P&gt;&lt;P&gt;Downfall to this is of course, no data is ever deleted. DB size grows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 20:13:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/identifying-changes-using-geodatabase-archive/m-p/470478#M18170</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2015-06-17T20:13:20Z</dc:date>
    </item>
  </channel>
</rss>

