select * from mytable where charindex(N'帐号',myfield)>0 

解决方案 »

  1.   

    select * from mytable where charindex('帐号',NCHAR(UNICODE(myfield)))>0
      

  2.   

    select * from mytable where charindex(N'帐号',NCHAR(UNICODE(myfield)))>0
      

  3.   

    select * from mytable where charindex(N'帐号',NCHAR(UNICODE(myfield)))>0
      

  4.   

    select * from mytable where charindex('帐号' COLLATE Chinese_PRC_CI_AI ,myfield COLLATE Chinese_PRC_CI_AI)>0
      

  5.   

    to:pengdali(大力) Server: Msg 170, Level 15, State 1, Line 1
    Line 1: Incorrect syntax near 'COLLATE'.to: yoki(小马哥) 
    还是查不出来
      

  6.   

    我忘了告诉大家了,我这儿是7.0,我用isql连接上去是可以查的。但是在查询分析器和企业管理器中都查不出来
      

  7.   

    这样可以么?
    select * from mytable where myfield like N'%帐号%'
      

  8.   

    不行,这是我试的第一个,没办法了,我已经编了个脚本,让客户在dos下执行了
    用isql -Sserver -Uuser -Ppass
    然后运行我的过程