Passing array as Parameter to SQL 2005 stored procedure?

For a number of different ways to do this, please see.

For a number of different ways to do this, please see: Arrays and Lists in SQL Server 2005.

Thanks for your response, seems like we are unable to pass array directly but can achieve desired goal through many alternatives mention in above link – Faizan Dosani Dec 17 '09 at 15:09.

This is still the case with Sql Server 2005. You make use of the XML type XML Support in Microsoft SQL Server 2005 Here is an example of how to split a string into rows using the XML data type DECLARE @textXML XML DECLARE @data NVARCHAR(MAX), @delimiter NVARCHAR(5) SELECT @data = 'A,B,C', @delimiter = ',' SELECT @textXML = CAST('' + REPLACE(@data, @delimiter, '') + '' AS XML) SELECT T.split. Value('.', 'nvarchar(max)') AS data FROM @textXML.

Nodes('/d') T(split).

Problem with using XML is that the markup eats the characters you can submit, because the markup is characters as well :/ – OMG Ponies Dec 17 '09 at 14:50 Hye, how are you, havent seen you in some time. Yes that is unfortunately true X-( – astander Dec 17 '09 at 14:51 I'm doing my best to keep ahead of you, but it's hard work =) – OMG Ponies Dec 17 '09 at 15:05.

Instead of a CSV, you could send an XML and then parse it in the procedure. For an example, look at Passing lists to SQL Server 2005 with XML Parameters.

See Passing an array or DataTable into a stored procedure for a method of passing arrays as image / varbinary objects and parsing them in the SP which is possible in SQL 2000 as well.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions