我有一个 XML 列:
<xmlList>
<XMLEntity>
<sug>ACHER</sug>
</XMLEntity>
<XMLEntity>
<sug>DOA</sug>
</XMLEntity>
</xmlList>
sug
只能容纳一个枚举成员(或ACHER
)DOA
。我想检查是否存在sug
没有这些值之一。
通过这种方式,我只得到 sug 节点,它是枚举值之一:
SELECT XMLSERIALIZE(XMLQUERY ('//xmlList/XMLEntity/sug[.="ACHER"]' passing
KTOVET ) as char large object) as XXX ,
XMLSERIALIZE(XMLQUERY ('//xmlList/XMLEntity/sug[.="DOA"]' passing
KTOVET ) as char large object) as YYY
FROM "TABLE"
我想获取值不是枚举值之一的sug
节点。可能的?如何获取其值为“ACHER”的 sug 节点?