My stored procedure is:
ALTER Proc [hometution].[Sp_GetHomePageProducts]
@CatIds nvarchar(500)
as
begin
Select Top 3 *
from Product p
where p.Id in
(Select ProductId
from Product_Category_Mapping PCM
where PCM.CategoryId in (@CatIds))
and p.ShowOnHomePage=1
and p.Deleted=0
order by UpdatedOnUtc
end
I am calling it like this
exec Sp_GetHomePageProducts @CatIds='17,12'
I am getting error
Conversion failed when converting the nvarchar value '17,12' to data type int.