最后拼的应该是这样的吧?
select * from temp where charindex(',562,',FoodIdList,0)>0
or charindex(',46,',FoodIdList,0)>0
or charindex(',65,',FoodIdList,0)>0
[/quote]
FoodIdList这个字段也得加逗号,否则两边的数匹配不了[/quote]
嗯,我知道。 主要是第一个参数怎么弄? charindex(',562,',FoodIdList,0)>0
最后拼的应该是这样的吧?
select * from temp where charindex(',562,',FoodIdList,0)>0
or charindex(',46,',FoodIdList,0)>0
or charindex(',65,',FoodIdList,0)>0
[/quote]
FoodIdList这个字段也得加逗号,否则两边的数匹配不了