Ad

How To Use XML To Configure A Store Procedure

- 1 answer

What I'd like to do is keep some configuration in an external XML file and my stored procedure to open this and use the settings defined in it. Is this possible? I dont want to store the XML in a table.

Ad

Answer

You can look into this article about Reading and Wrinting files in SQL Server using tsql after that you might want to check out the OPENXML-documentation

OPENXML provides a rowset view over an XML document. Because OPENXML is a rowset provider, OPENXML can be used in Transact-SQL statements in which rowset providers such as a table, view, or the OPENROWSET function can appear.

This might be what you are looking for.

Ad
source: stackoverflow.com
Ad