我不认为 IN 子句可以接受具有多个值的绑定参数。甲骨文不能和几分钟
查询是
declare @setting varchar(max)
set @setting ='''Sales Entry Grid Cursor'',''Customer Mandatory'',''Column Uom'',''Show Marka'',''Show Discount Amount In Grid'',''Show Discount % In Grid'',''Calculation based on Weight *rate'''
和存储过程是
Select pageconfig_action
From [RetailSoft].[dbo].[tbl_pageconfig]
Where [PageConfig_settingsName] in (@setting)
and PageConfig_CompanyId = 1
结果为空
并在关键字中直接传入字符串
Select pageconfig_action
From [RetailSoft].[dbo].[tbl_pageconfig]
Where [PageConfig_settingsName] in ('Sales Entry Grid Cursor', 'Customer Mandatory', 'Column Uom', 'Show Marka', 'Show Discount Amount In Grid', 'Show Discount % In Grid', 'Calculation based on Weight *rate')
and PageConfig_CompanyId=1
那么结果就ok了