SQL Insert & update archived feature class in SQL Server

04-16-2014 12:46 AM
New Contributor II

I'm trying to insert and update features with SQL commands in feature class enabled for archiving in SQL server. I'm trying to follow help instructions in section Geodata / Administering geodatabases / Using SQL. I'm calling INSERT and UPDATE SQL commands directly on archive view, for example BROWNFIELDS_P is table with archived data and BROWNFIELDS_P_EVW is the archived view.

When I try to run SQL command on archived view, INSERT commands seems to be OK. But when I try to UPDATE any row by "WHERE OBJECTID = 0", I get PRIMARY KEY constraint error.

Is it possible to perform INSERT and UPDATE SQL commands directly on archived view or should I use these commands on underlying table and extend there commands with GDB_ARCHIVE_OID, GDB_FROM_DATE and GDB_TO_DATE columns?

Thank you very much for your advice!
0 Kudos
1 Reply
Occasional Contributor II

Ever find an answer to this?  I'm trying to do something similar and am wondering how to get the correct records using SQL.

0 Kudos