Question: I want to pass multiple values in a single parameter. SQL Server 2005

Answer: 
You can have your sproc take an **`xml`** typed input variable, then unpack the elements and grab them. For example:

```
DECLARE @XMLData xml

DECLARE 
    @Code varchar(10),
    @Description varchar(10)

SET @XMLData = 
'
    <SomeCollection>
      <SomeItem>
        <Code>ABCD1234</Code>
        <Description>Widget</Description>
      </SomeItem>
    </SomeCollection>
'

SELECT 
    @Code = SomeItems.SomeItem.value('Code[1]', 'varchar(10)'),
    @Description = SomeItems.SomeItem.value('Description[1]', 'varchar(100)')
FROM @XMLDATA.nodes('//SomeItem') SomeItems (SomeItem)

SELECT @Code AS Code, @Description AS Description

```

Result:

```
Code        Description
==========  ===========
ABCD1234    Widget

```
There are multiple ways you can achieve this, by:

1. **Passing CSV list** of strings as an argument to a (N)VARCHAR parameter, then parsing it inside your SP, [check here](http://sqlwithmanoj.com/2012/09/09/passing-multipledynamic-values-to-stored-procedures-functions-part1-by-passing-csv/).
2. Create a **XML string** first of all, then pass it as an XML datatype param. You will need to parse the XML inside the SP, you may need APPLY operator for this, [check here](http://sqlwithmanoj.com/2012/09/09/passing-multipledynamic-values-to-stored-procedures-functions-part2-by-passing-xml/).
3. Create a **temp table** outside the SP, insert the multiple values as multiple rows, no param needed here. Then inside the SP use the temp table, [check here](http://sqlwithmanoj.com/2012/09/09/passing-multipledynamic-values-to-stored-procedures-functions-part3-by-using-table/).
4. If you are in 2008 and above try **TVPs (Table Valued Parameters)** and pass them as params, [check here](http://sqlwithmanoj.com/2012/09/10/passing-multipledynamic-values-to-stored-procedures-functions-part4-by-using-tvp/).