Wednesday, May 16, 2012

T-SQL: Select node value from xml column

SQL Code:

Column name is wau_xml

SELECT wau_xml.value('(/Document/VersionNo)[1]', 'int') FROM Table


XML in column:

<Document>

<VersionNo>1</VersionNo>

</Document>


No comments:

Post a Comment