AnsweredAssumed Answered

Recover domains with sql query in a postgresql geodatabase

Question asked by crodriguez@muniguate.com on Aug 16, 2018
Latest reply on Aug 20, 2018 by crodriguez@muniguate.com

Hi, I need to create this Oracle script in Postgresql, I do not have experience in xml and I need to list all the domains in a query, but in a Postgresql geodatabase. The query below it works in a Oracle Geodatabase. Thanks.  Carlos Rodriguez

 

SELECT items.Name NOMBRE_DOMINIO,
itemtypes.Name TIPO_DOMINIO,
EXTRACTVALUE (CodedValues.COLUMN_VALUE, 'CodedValue/Code') AS CODIGO_DOMINIO,
EXTRACTVALUE (CodedValues.COLUMN_VALUE, 'CodedValue/Name') AS DESCRIPCION_DOMINIO
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'))) CodedValue
WHERE itemtypes.Name IN ('Coded Value Domain', 'Range Domain');

Attachments

Outcomes