Preserving GlobalID in Swap/update of feature

487
1
Jump to solution
09-20-2016 09:58 AM
Highlighted
Occasional Contributor

I am looking for a solution in swapping out a spatial feature in an update to the GIS portion and not attributes.  I can't find much on doing this without losing the old GlobalID and thus breaking relationships.  If I have to go and move vertices by hand, why even bother about accuracy?

Is there a way to perform an update?  The Update tool ESRI has is worthless, it creates a brand new feature class and never "updates" the feature class you are working on.  In the back end of the SQL database I know you can perform updates all day long but what about on the spatial GIS portion???

I'm in 10.4.1 in everything ESRI and running SQL Server 2012 and the Global ID will be my relationship key (when we build it shortly).  I don't want to use the Global so if anyone has an alternative for offline editing we can use, that would be perfect!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor

My database guy got me access to a sandbox I can play in.  I created a feature class and added a globalID on it and then I ran a very simple update statement to the globalID in SQL Server Management Studio.  Voila!  As long as the GlobalID isn't NULL you can change it to any ID you want!  Even the one you used to have in the database like the old feature!  I swapped these all around a few times with no issue! 

UPDATE Parent
SET GLOBALID='DE00A00E-A060-0AC4-B555-2DE5B6AF04D4'
WHERE OBJECTID=2;

So even though the front end of ArcGIS is extremely prohibitive and makes the GUID/UUID looks scary, you can easily manipulate this value. I did this on the Parent UUID and the Child GUID.  The Child GUID is nullable so that's even less restrictive on the backend.

View solution in original post

0 Kudos
1 Reply
Highlighted
Occasional Contributor

My database guy got me access to a sandbox I can play in.  I created a feature class and added a globalID on it and then I ran a very simple update statement to the globalID in SQL Server Management Studio.  Voila!  As long as the GlobalID isn't NULL you can change it to any ID you want!  Even the one you used to have in the database like the old feature!  I swapped these all around a few times with no issue! 

UPDATE Parent
SET GLOBALID='DE00A00E-A060-0AC4-B555-2DE5B6AF04D4'
WHERE OBJECTID=2;

So even though the front end of ArcGIS is extremely prohibitive and makes the GUID/UUID looks scary, you can easily manipulate this value. I did this on the Parent UUID and the Child GUID.  The Child GUID is nullable so that's even less restrictive on the backend.

View solution in original post

0 Kudos