It seems that when I delete features in SDE, they remain in the database.
I built a quick damage assessment application that consists of the following steps:
I have steps 2 & 3 run in a geoprocess, but I've found that even after deleting the features, the data still shows up in my report. I verified this in SQL Server Management Studio.
Because I'm using the data offline, the feature set is not versioned, but archiving is enabled.
As a workaround I execute a delete query in SQL before running my report so that it comes out clean. Is there a way to run my delete query in Model Builder so I can incorporate it into my geoprocess?
Solved! Go to Solution.
When your data is archive enabled the timestamps on your data are used to determine what the current representation of your data is. We do not actually delete the records, rather we 'mark' them as deleted by setting a timestamp to the current moment. I would strongly caution against running delete queries in SQL before running your report. Rather I would suggest that you use the archive view to access your data or alter your Excel report to only query data that is current (gdb_to_date field = 12/31/9999).
Below are some links to some of the help documentation on accessing your data via SQL.
SQL Access to enterprise geodatabase data.
The archive process - see the paragraph "Enabling archiving on nonversioned data"
Hope this helps,
Russell
When your data is archive enabled the timestamps on your data are used to determine what the current representation of your data is. We do not actually delete the records, rather we 'mark' them as deleted by setting a timestamp to the current moment. I would strongly caution against running delete queries in SQL before running your report. Rather I would suggest that you use the archive view to access your data or alter your Excel report to only query data that is current (gdb_to_date field = 12/31/9999).
Below are some links to some of the help documentation on accessing your data via SQL.
SQL Access to enterprise geodatabase data.
The archive process - see the paragraph "Enabling archiving on nonversioned data"
Hope this helps,
Russell
Thanks for your help. I found the view and wrote a new report referencing it instead of the database table. Works just like I want it to.