2

Conditions: ArcGIS for Desktop 10.2 and ArcSDE 10.1

Is there a way to select recently edited features using the automatically populated fields that Editor Tracking uses?

The new Editor Tracking feature allows geodatabase managers to track changes to features. There are four new fields that track the creation user/date and the last edit user/date. I'd like to use SQL to identify recently edited ones for other tasks.

The psuedocode would be something like:

SELECT FROM [feature] WHERE [editor tracking field] LIKE [2013-11-04]
  • What is your DBMS? The examples below are for Oracle. – blah238 Nov 4 '13 at 21:03
  • @blah238 Correct, Oracle. Should that be added in the tags? – Elliott Nov 5 '13 at 20:08
2

Relational operators like >, >=, and LIKE can definitely be used to select from Editor Tracking fields. Here is an example with my data structure

SELECT * FROM LANDUSE.TaxParcel WHERE LAST_EDITED_DATE
    > TO_DATE('2013-11-01 19:15:33','YYYY-MM-DD HH24:MI:SS')

One interesting note is that the full date/time is not required, so long as the condition has a matching definition in the query. Using the example above, the following are all valid queries:

> TO_DATE('2013-11-01','YYYY-MM-DD') -- selects features edited after 01 November 2013
>= TO_DATE('2013-11','YYYY-MM') -- selects features edited in November 2013
LIKE TO_DATE('2013-11-04','YYYY-MM-DD') -- selects dates like 04 November 2013

Procedure in ArcMap 10.2

  1. Using the Select By Attributes dialog, set the appropriate layer and select the field in your data that represents the last edit date.
  2. Click Get Unique Values to see how the query after the operator should be formatted.
  3. Build a query with the operator that best fits your algorithm. For example:

    SELECT * FROM LANDUSE.TaxParcel WHERE LAST_EDITED_DATE
         > TO_DATE('2013-11-01','YYYY-MM-DD')
    
  4. Edit the date and time fields as required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.