Tag: C#

Arrays and Lists in SQL Server 2008

I sure hope this article will help solve a problem for me: http://www.sommarskog.se/arrays-in-sql-2008.html" . It sure looks promising since the opening paragraph pretty much asks my question and the remainder of the article addresses it with solutions. I would like to pass an array of id's as a single parameter to a stored procedure. Another solution to consider is passing the id's as an XML string, and then parse the XML into a temp table to join against, or a query against the XML directly using SP_XML_PREPAREDOCUMENT and OPENXML. Continue reading Arrays and Lists in SQL Server 2008