I'm trying to understand how to make sure a delete is a proper delete and not a modification, and vice versa. I'm using ArcGIS 10.2 and Enterprise geodatabase on MS SQL Server.
See below SQL:
select delete_table.*, add_table.* from
db.schema.a175 add_table
full join
db.schema.d175 delete_table
on
delete_table.SDE_DELETES_ROW_ID = add_table.OBJECTID
and add_table.sde_state_id = delete_table.sde_state_id
where objectReference = 'Asset1'
and this returns something like
In this query, Asset1 is meant to have 2 objects related to it. But the user made two objects and realised one was wrong, deleted it and added another object. So now the Add table has three objects and the Delete table shows one.
But reading this output, I would have guessed objectid 8908810
is modified because there is also an entry in the Add table, and if this was a Deleted object, then the joined Add record would be all null
s.
Using the Add and Delete tables, how do I distinguish between modified and deleted objects?