how to get all the coded value from a domain in an SDE to a table

2721
3
04-26-2016 10:38 AM
lelaharrington
New Contributor III


trying to get all the values of a domain so i can check it for updates that are needed. i would like to get it in tabular form and then bacble to modify and republish it to the domain when completed.

0 Kudos
3 Replies
WesMiller
Regular Contributor III
ThomasColson
MVP Frequent Contributor

This will create a view (sort of table) that will display your coded value domain:

CREATE VIEW [dbo].[View_Landform]
AS
SELECT    codedValue.value('Code[1]', 'nvarchar(max)') AS 
, codedValue.value('Name[1]', 'nvarchar(max)') AS [Value]

FROM        dbo.GDB_ITEMS AS items INNER JOIN

                      dbo.GDB_ITEMTYPES AS itemtypes ON items.Type = itemtypes.UUID CROSS APPLY items.Definition.nodes('/GPCodedValueDomain2/CodedValues/CodedValue')

                      AS CodedValues(codedValue)

WHERE    itemtypes.Name = 'Coded Value Domain' AND items.Name = 'Landform'

GO

The edit method described in Re-order Attribute Domain Values  can also be used to execute the edits you desire without having to remove the domain from the FC attribute and re-import it.

0 Kudos
JenniferMcCall4
Occasional Contributor III

You can also check out XRay http://www.arcgis.com/home/item.html?id=e1e911d7d7374285b1ef03d06b3ee642 .

I believe you can use this to push domain edits back into the GDB.