Add Field to a SQL Geodatabase using T-SQL
Sometimes a new field will need to be added quickly. The usual process of testing changes and pushing said changes to production is not very time sensitive. Here is a method I use when a new field is needed ASAP. In this case the feature classes have been registered in the geodatabase and archiving has been enabled. This means there is an SDE base table and several SDE delta tables. The information needed to proceed is listed below. This will require DBO level access and SQL Server Management Studio or other suitable RDBMS interface like Toad. Database Name = DemoData New Field Name = NewField New Field Type (Length) = string(50) / nvarchar(50) SDE Field Type Code = Unknown New Field Name = NewField Feature Class Name = Marker Base Table Name = Marker Base Table ID = Unknown Delta Table (Adds) = Unknown Delta Table (Archive) = Unknown First thing to do is find the unknown values. The SDE Field Type Code via Esri tells us that the SDE Field Type Code for Stri...
Comments
Post a Comment