Skip to content

Instantly share code, notes, and snippets.

@BrunoCaimar
Created July 31, 2020 19:02
Show Gist options
  • Save BrunoCaimar/ec93ac6080da9e43af486a19692ba3ad to your computer and use it in GitHub Desktop.
Save BrunoCaimar/ec93ac6080da9e43af486a19692ba3ad to your computer and use it in GitHub Desktop.
ArcGIS - Query para obter valores de um dominio
SELECT
*
FROM
(
SELECT
extractvalue(codedvalues.column_value,'CodedValue/Code') AS code,
extractvalue(codedvalues.column_value,'CodedValue/Name') AS value
FROM
sde.gdb_items_vw items
INNER JOIN
sde.gdb_itemtypes itemtypes
ON
items.type = itemtypes.uuid,
TABLE ( xmlsequence(xmltype(definition).extract('/GPCodedValueDomain2/CodedValues/CodedValue') ) ) codedvalues
WHERE
itemtypes.name = 'Coded Value Domain'
AND
items.name = 'NOME_DO_DOMINIO'
) codedvalues
ORDER BY 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment