不要用*号,换成"%"。标准的SQL通配符只有"%".

解决方案 »

  1.   

    select fld1 from table where fld1 like '%h%'
      

  2.   

    select fld1 from table where fld1 like '*h*'
    h是变量,要加入符号,后面在加%
      

  3.   

    select fld1 from table where fld1 like '*h*'
    h是变量,要加入符号,后面在加%
      

  4.   

    我不知道在sql中有*也是通配符。
    用%
      

  5.   

    Access中不持 标准sql语句中的 % , 
    在 Access中 % 只是代表一个符号而已,不是代表一个通配符. 
    Access在 Jet 和 ADO 驱动中是把 * 当成通配符的, 但是现在使用的是ODBC, 它把*也当成了一个普通字符了.不是各位所说的, 可能上面的兄弟没有用过Access吧
      

  6.   

    楼主,我也是用ACCESS,用%运行结果正确呀.
      

  7.   

    select fld1 from table where fld1 like '%h%'如果 h是变量请注意空格!!!有的系统 变量前后要多加一个空格
      

  8.   

    如果h是变量该这样用
    select fld1 from table where fld1 like '%'+h+'%'
      

  9.   

    如果h是变量该这样用
    "select fld1 from table where fld1 like '%"+h+"%'