One of the most popular ways to get data multiple pieces of data in a single parameter from one stored procedure to another, or from a client application to the database is to use XML. This can be done in SQL Server 2000 by using the NTEXT (or TEXT) datatype, and in SQL 2005 using the XML datatype. (In SQL Server 2008 you can use Table variable input parameters.)
Being able to use this XML data means knowing how to work with XML documents, as well as knowing how to use XPath. For many DBAs working with XPath is very new. Until now its been pretty much the domain of developers.
I would normally put a whole bunch of source code here, but I posted some earlier this year in my “XML in the database. What’s the big deal any way?” posting, so I’ll simply refer you back to it.
Contact the Author | Contact DCAC