sql server - Find all "null" values using xquery -


i tasked find values <nodea> empty. mean null, or doesn't exist.

i have crafted below query

select * table attributelist.value ('(/attributelist/nodea)[1]', 'varchar(50)') null 

however returns results <attributelist />

what curious of return xml looked like

<attributelist>     <nodea></nodea> </attributelist> 

there no need extract values xml. use exist instead.

select * yourtable  attributelist.exist('/attributelist/nodea/node()') = 0 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -