1

In the image there is a simple querie but not peform as I wish. all values of one cateogry is wrapped by {,} and I need one value per line without these characters

sql_result

Here is a sample of xml column

<GPCodedValueDomain2 xsi:type='typens:GPCodedValueDomain2' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.6'>
<DomainName>tBooleanDomain</DomainName><FieldType>esriFieldTypeSmallInteger</FieldType>
<MergePolicy>esriMPTDefaultValue</MergePolicy><SplitPolicy>esriSPTDuplicate</SplitPolicy>
<Description>A 0/1 boolean domain</Description><Owner>sde</Owner>
<CodedValues xsi:type='typens:ArrayOfCodedValue'><CodedValue xsi:type='typens:CodedValue'>
<Name>Falso</Name>
<Code xsi:type='xs:short'>0</Code>
</CodedValue><CodedValue xsi:type='typens:CodedValue'>
<Name>Verdadeiro</Name>
<Code xsi:type='xs:short'>1</Code></CodedValue></CodedValues></GPCodedValueDomain2>

How can I do this?

1 Answer 1

1

In the following way, you can get a single value per line without any other characters

unnest(xpath('//Name/text()', definition)) as "value"

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.