0

I have an XML column:

<xmlList> 
   <XMLEntity> 
      <sug>ACHER</sug>
   </XMLEntity>

  <XMLEntity> 
      <sug>DOA</sug>
   </XMLEntity>
</xmlList>

In this way I get just the sug node:

SELECT XMLSERIALIZE(XMLQUERY ('//xmlList/XMLEntity/sug' passing 
KTOVET ) as char large object) as XXX 
FROM "TABLE"  

How can I get the sug nodes where its value is "ACHER"?

1 Answer 1

1

You can try using this XQuery expression :

//xmlList/XMLEntity/sug[.="ACHER"]
Sign up to request clarification or add additional context in comments.

1 Comment

I get lines that their sug but their value is DOA as empty lines, since they indeed have sug. How can I filter them so they will not appear? Thanks in advance1

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.