My table contains 2 columns, one is the Id
of type int
and the other is of type Xml
.
In the Xml
column, I have data of this structure
<Fields>
<Field name='aa' value='000'/>
<Field name='bb' value='111'/>
<Field name='cc' value='222'/>
</Fields>
Now using XQuery, I want to query the table to get all rows where field tag with name attribute is aa
and value attribute is 111
, AND field tag with name is attribute bb
and value attribute is 222
.
In other words I want to supply the name / value pair and get rows where the xml data match.
Thank you !