Hello Experts,Im facing problem in one of the reports while passing multivalue parameter fromssrs to SP.please note that in cases suppose there are single word in multivalue paramtere then its works corretly,in that scenario i have made one function see below:-ALTER FUNCTION [dbo].[fn_MVParam] (@RepParam nvarchar(4000), @Delim char(1)= ',') RETURNS @Values TABLE (Param nvarchar(4000))AS BEGIN DECLARE @chrind INT DECLARE @Piece nvarchar(100) SELECT @chrind = 1 WHILE @chrind > 0 BEGIN SELECT @chrind = CHARINDEX(@Delim,@RepParam) IF @chrind > 0 SELECT @Piece = LEFT(@RepParam,@chrind - 1) ELSE SELECT @Piece = @RepParam INSERT @Values(Param) VALUES(CAST(@Piece AS VARCHAR)) SELECT @RepParam = RIGHT(@RepParam,LEN(@RepParam) - @chrind) IF LEN(@RepParam) = 0 BREAK END RETURN END
and did changes in sp as follow :-where branchname in IN (SELECT Param FROM dbo.fn_MVParam(@branchname,',')))
Above is working correct.But its not working in below scenarion when customer name is like this in ssrs multivalue parameter selection.ex:-arg soft ltdadani power, GNRGSP AHDwitco - compIn SP i have used this code:-where customername in IN (SELECT Param FROM dbo.fn_MVParam(@customername,',')))
please let me know how is it possible to do it?im using ssrs2005.Regards,abhi