In a table, I have multiple rows, each containing xml based on common schema. An example of the XML might be:
<Items>
<Item>Item 1</Item>
<Item>Item 2</Item>
</Items>
If I have multiple rows in a table, all containing similar xml, is it possible to write a query that returns all values in the Item node for all rows, in a single resultset? We’re using SQL Server 2008 R2
If your xml is defined in an
XMLcolumn ..Will give you
The key here is
nodes()which