如何检查XQuery exist方法中的多个值?我在SQL语句中运行这个XQuery
Select [column1] [xmlcolumn] from tablet
where [xmlcolumn].exist('/node/subnode/subsubnode[.="value1"]') = 1我希望能够指定多个值like [.="value1" OR "value2" OR ...]。
任何指点都是非常感谢的。
发布于 2012-08-17 12:22:10
使用的
exists(/node/subnode/subsubnode[. eq "value1" or . eq "value2"])XPath区分大小写,要使用的运算符是"or",而不是"OR"。
如果你有很多值,使用会更实用
exists(/node/subnode/subsubnode
[. = ("value1","value2","value3","value4","value5")])https://stackoverflow.com/questions/11995347
复制相似问题