比如我们的产品中有  SM/W/JC ,TY/JY, LK/FK  SA/YU....  我想过滤掉其中的一部分产品。 如想过滤掉含有 SM,JT,FK 的 我用上面的试了一下不行.

解决方案 »

  1.   

    select * from t where 字段 not like '%SM%' and 字段 not like '%FK%' and 字段 not like '%JT%'
      

  2.   

    select * from 表名 where patindex('%[SM]%',列名) = 0 AND patindex('%JT]%',列名) = 0 and patindex('%[FK]%',列名) = 0
      

  3.   

    select * from 表名 where charindex('SM',列名) <1 AND charindex('JT',列名) <1 and charindex('FK',列名) <1