我的存储过程是:
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
我这样称呼它
exec Sp_GetHomePageProducts @CatIds='17,12'
我收到错误
将 nvarchar 值 '17,12' 转换为数据类型 int 时转换失败。