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

Answer: 
You *can* make a function:

```
ALTER  FUNCTION [dbo].[CSVStringsToTable_fn] ( @array VARCHAR(8000) )
RETURNS @Table TABLE ( value VARCHAR(100) )
AS 
    BEGIN
        DECLARE @separator_position INTEGER,
            @array_value VARCHAR(8000)  

        SET @array = @array + ','

        WHILE PATINDEX('%,%', @array) <> 0 
            BEGIN
                SELECT  @separator_position = PATINDEX('%,%', @array)
                SELECT  @array_value = LEFT(@array, @separator_position - 1)

                INSERT  @Table
                VALUES  ( @array_value )

                SELECT  @array = STUFF(@array, 1, @separator_position, '')
            END
        RETURN
    END

```

and select from it:

```
DECLARE @LocationList VARCHAR(1000)
SET @LocationList = '1,32'

SELECT  Locations 
FROM    table
WHERE   LocationID IN ( SELECT   CAST(value AS INT)
                           FROM     dbo.CSVStringsToTable_fn(@LocationList) )

```

OR

```
SELECT  Locations
FROM    table loc
        INNER JOIN dbo.CSVStringsToTable_fn(@LocationList) list
            ON CAST(list.value AS INT) = loc.LocationID

```

Which is extremely helpful when you attempt to send a multi-value list from SSRS to a PROC.

**Edited:** to show that you may need to CAST - However be careful to control what is sent in the CSV list
Just to suggest. You can't really do so in SQL Server 2005. At least there is no a straightforward way. You have to use CSV or XML or Base 64 or JSON. However I strongly discourage you to do so since all of them are error prone and generate really big problems.

If you are capable to switch to SQL Server 2008 you can use Table valued parameters ([Reference1](http://msdn.microsoft.com/en-us/library/bb510489.aspx), [Reference2](http://msdn.microsoft.com/en-us/library/bb675163.aspx)). 

If you cannot I'd suggest you to consider the necessity of doing it in stored procedure, i.e. do you really want (should/must) to perform the sql action using SP. If you are solving a problem just use Ad hoc query. If you want to do so in education purposes, you might try don't even try the above mentioned things.