缺了括号!
select * from table where  '47' in (parentstr)

解决方案 »

  1.   

    你的exec sql....是何意思?select * from table  where parentid like '%53%'
      

  2.   

    select * from table  where parentid like '%53%'
     WangZWang(阿来) 兄,用你的方法,下面结果一定出错
    exec  sql 4
    12 4
    13 4,37
    14 47,4,55,48那这个结果就会出错
    --exec  sql 4  表示执行sql语句
      

  3.   

    select * from table  
    where charindex(',53,',','+parentid+',')>0
      

  4.   

    如果你要传参数,可以
    charindex(','+@i+',',','+parentid+',')>0