xml query with sql



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"?


No comments:

Post a Comment