Select to view content in your preferred language

Query SQL for CV Domains assigned to Feature Classes

05-21-2021 09:17 AM
Occasional Contributor

In cleaning up our long list of cv domains in our 5 geodatabases, we wanted a quick way to list the domains and what feature class(es) they were assigned to.  I searched online but didn't find anything, so we came up with this little query to list our feature classes with associated domains.  No question - just sharing.  Hope this can help someone in the future.

SELECT I.Name as "CV Domain Name", I.Type, RI.Name as "Feature Class Name"
   FROM [GDBName].[sde].[GDB_ITEMS] as I
      Left Outer Join
      (SELECT I.Name, OriginID, DestID
         Inner Join [GDBName].[sde].[GDB_ITEMS] as I
         On r.OriginID = I.UUID) as RI
         On I.UUID = RI.DestID
where i.Type = '8C368B12-A12E-4C7E-9638-C9C64E69E98F' --This Type is Coded Value Domain
Order by I.Name, RI.Name

0 Replies