Try creating this function:
CREATE FUNCTION ParamsToTable( @delimString varchar(255) )
RETURNS @paramtable TABLE ( Id int ) AS
BEGIN
DECLARE @len int,@index int,@nextindex int
SET @len = DATALENGTH(@delimString)
SET @index = 0
SET @nextindex = 0
WHILE (@len > @index )
BEGIN
SET @nextindex = CHARINDEX(';', @delimString, @index)
if (@nextindex = 0 ) SET @nextindex = @len + 2
INSERT @paramtable
SELECT SUBSTRING( @delimString, @index, @nextindex - @index )
SET @index = @nextindex + 1
END
RETURN
END
GO
And then use this in a join statment.
Select * from table
join ParamsToTable(',', @SelectedColor)
[quoted text, click to view] <deepu_t@hotmail.com> wrote in message
news:1122873928.521881.234610@o13g2000cwo.googlegroups.com...
> Hi all
>
> I have a multi value drop down list and their values are a string data
> type.
>
> Label Value
> Blue BL
> Pink PK
>
> If I select more than one values the parameter value is sent as 'BL,
> PK'
>
> The stored procedure has a where clause
>
> WHERE theColor IN (@SelectedColor)
>
> This does'nt return the expected results from the stored procedure.
> How do we make the reporting services pass 'BL','PK' instead of 'BL,
> PK' to the stored procedure?
> How do I make this work??
>
> Thanks heaps!!
>