I've created the following stored procedure:
ALTER PROCEDURE [dbo].[CountInJunction]
        @Mod  as nvarchar(10),
        @Junction as nvarchar(10),
        @PJ as nvarchar(10),
        **@case as varchar(10)**,
        @Date as varchar(20)
    as
begin
declare @result as int
select @result = count(distinct CONCAT ([UCID],[CALLSEGMENT])) 
from IVR_LINES
where MODULE = @Mod and  DATE = @date
and EVENT_NAME = @Junction and **EVENT_VALUE in (@case)** 
insert into [dbo].[MainJuncTable] values(@Mod,@PJ,@Junction,@case,@result,null,null,@date)
return @result
end
I would like to pass ('0','5') as @case.
for some reason, I get 0 as a result, which is not correct. Its seems that the SP doesn't interpret ('0','5') correctly. I've been trying multiple combinations such as:
'0','5'
'0'+','+5''
'0,5'
etc..
nothing works.
Is there any way I can pass these chars correctly?
Thanks.
 
     
     
    