select * from problem where (date<'2002-08-01' or date>'2002-08-01') and id<>"zh16,zh18,zh20,zh33"

解决方案 »

  1.   

    date是日期型的吗?如果是这样写:
      select * from problem where (date<#2002-08-01#) or (date>#2002-08-01# and id not in ("zh16","zh18","zh20","zh33")
      

  2.   

    错了点,最后少了个括号:
      select * from problem where (date<#2002-08-01#) or (date>#2002-08-01# and id not in ("zh16","zh18","zh20","zh33"))
      

  3.   

    I have give u the answer at
    http://expert.csdn.net/Expert/topic/1134/1134270.xml?temp=.6289026
    not right?
      

  4.   


    select * from problem where date<>'2002-08-01' and id in (zh16,zh18,zh20,zh33)
      

  5.   

    In msdn,there are a article give 'not in' and 'instr' to resolve the problem like this
      

  6.   

    ~~ button sister,nice to meet u
      

  7.   

    谢谢各位大哥,icevi(按钮工厂)大哥的回答给我解决了问题,真的非常感谢,你可以留个邮箱给我吗?
      

  8.   

    ~~ Button sister! Remember it :)