Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Prepare an XML document from one stored in a table

By Simon Sabin,

The script allows you to prepare an xml document as you would use the sp_xml_preparedocument but by specifying a SQL statement. i.e

sp_xml_preparedocumentfromcolumn @iDoc OUTPUT, 'SELECT TOP 1 documentColumn From myTable'

Total article views: 528 | Views in the last 30 days: 1