sql - XQuery UNION of multiple criteria -


how code in xquery (sql server 2012) .exist multiple criteria?

declare @x xml = '     <row parentid="45" objectid="0" node="root.local.navigation[7]" itemkey="page" itemvalue="confirmation" itemtype="string" />     <row parentid="45" objectid="0" node="root.local.navigation[7]" itemkey="visited" itemvalue="false" itemtype="bool" />'  -- these work fine select @x.exist('/row[@node eq "root.local.navigation[7]"]') select @x.exist('/row[@itemvalue eq "confirmation"]') 

but when run below returns error

xquery [exist()]: xquery syntax 'union' not supported.

select @x.exist('/row[@node eq "root.local.navigation[7]"] | /row[@itemvalue eq "confirmation"]') 

thanks in advance.

in case, or should work fine same thing.

select @x.exist('/row[@node eq "root.local.navigation[7]" or @itemvalue eq "confirmation"]') 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -