I have a xml column in a table. Data could look like this:

<xml xmlns="http://something">
<grid id="ProductsOnShelf">
<row id="1">
<item id="type">Computer</item>
<item id="size">Big</item>
<item id="price">100</item>
<row id="2">
<item id="type">Bike</item>
<item id="size">Huge</item>
<item id="price">50</item>

That is the content in one row in the table. All rows have xml data on that form, but the actual data for the items is varying.

Now I want to create a sql query, where I select all rows in the table which contains item-nodes with id="size" and the value "Huge", independent of which row in the grid data they are located in. I can do this with the exist-function, but then it becomes case-sensitive, and I do not want that.

I have tried this one (among others), but it does not return any result:

FROM Products
WHERE ProductsOnShelf.query('declare namespace st="http://something";
/st:data/st:grid[@id="ProductsOnShelf"]/st:row/st:item[@id="size"]').value('.','NVARCHAR(255)') = 'Huge'