1

I am struggling to build a definition query using ArcGIS to select last updated record in relation to unique CADID (core data example below). enter image description here

CADID is unique, updates recorded additional record in the FileGDB with same CADID with recent date and time stamp on it. I need to extract only unique record on (CADID) with last update.

Core dataset contains all records to keep track of historical updates but for current processing need only the latest updated record as follows. enter image description here

I have heaps of datasets, and updates are happening to all datasets, manual selection is a real headache.

I applied different tricks without success. I can supply sample data to run the query.

4
  • I doubt it FileGeodatabase supports MIN,MAX,Count,... functions. If personal geodatabase (or ArcSDE) is an option, then it is possible to filter the data with these functions Commented Jul 9, 2015 at 0:25
  • You may give it a go in Python interpreter to this arcpy.SearchCursor("YOUR_TABLE",'"lastupdate" = (SELECT MAX("lastupdate") from YOUR_TABLE)').next().cadid. You need to specify YOUR_TABLE with your table/feature class name and use right field delimiters.
    – fatih_dur
    Commented Jul 9, 2015 at 0:32
  • @fatih_dur, the user didn't mention any arcpy or python tag in his question! I think, python is not an option here! Commented Jul 9, 2015 at 0:35
  • @FaridCher, fair point. When I see ArcMap Attribute Table snapshots, iIthought this is one step away from accessing to the interpreter. In any case, I believe Python gives more control over such processes and easier that dealing with them in FME. Think, in a very small script, you are listing your dataset heap and processing/reporting cadid's right away.
    – fatih_dur
    Commented Jul 9, 2015 at 0:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.