Select to view content in your preferred language

Default Values, split and merge policies and editing

1076
3
09-12-2013 01:05 PM
TomMagdaleno
Frequent Contributor
I have a bunch of lines and points with default values which are different than the default.  I need to change the subtype, but the rest of the default values need to stay the same.  When I change it in the attribute window it gives me the option to leave the rest of the default columns alone.  But if I do a huge selection and use field calculator to change a bunch in table view it will change the other columns to have the default values.  This isn't a split or a merge, so I'm not sure what to do to

Basically I want to say "No" to assigning default values on edits on multiple records at once.

tom
0 Kudos
3 Replies
WilliamCraft
MVP Alum
Is this data in SQL Server or Oracle by chance?  Your best bet might be to run a SQL statement against the table to update the attribute values for the subtype field without affecting the other fields.  If you do this on a versioned feature class, make sure there are no records in the corresponding A and D tables before executing your SQL against the base table.  In other words, go to state 0 before mass applying a SQL attribute update.
0 Kudos
TomMagdaleno
Frequent Contributor
The data is in SQL Server.  Your two for two on guessing my system so far 🙂
That sounds a bit complicated.  So I would do it in a table view or in SQL server?  That sounds like a database shuffle waiting to happen.  I'll have to think about that.
0 Kudos
WilliamCraft
MVP Alum
If you are only updating one field (the subtype field) of a particular table, then something like this would be all you need:

UPDATE DBO.SDE.TABLE1
SET SUBTYPE = 1
WHERE SUBTYPE = 2;

Running this statement in SQL Server Studio Manager as a user with write privileges on that table (or the 'sa' account) would change the values for the SUBTYPE field but no other fields.  Let's say that you'd like to change all values that are currently '2' to become values of '1'.  The statement above would accomplish this. 

If your table is versioned, ensure that you have compressed to state 0 before doing something like this on the base table (i.e., DBO.SDE.TABLE1).
0 Kudos