I\'m having a table with one XML column. I\'d like to filter out the rows where a specific attribute in the XML match a string, essentially doing a WHERE or HAVING.
The
Found it. Instead of using query() I should be using exist().
My query would then be
SELECT id, xml.query('data(/xml/info/@name)') as Value FROM Table1 WHERE xml.exist('/xml/info/[@name=sql:variable("@match")]') = 1