select * from DictOper where OperName collate Chinese_PRC_CS_AS_WS = 'Wang'服务器: 消息 170,级别 15,状态 1,行 1
第 1 行: 'collate' 附近有语法错误。

解决方案 »

  1.   

    select * from DictOper where OperName = 'Wang' collate Chinese_PRC_CS_AS_WS
      

  2.   

    1. 你的sql server版本要求是2000或者以上, 之前的版本是不支持的.
    2. 你的数据库兼容级别必须是>=80, 否则也是不支持的
      

  3.   

    -- 下面的简单语句可以演示数据库兼容级别对collate 的影响USE pubsEXEC sp_dbcmptlevel 'pubs',70
    GOselect * from sysobjects where name = 'Wang' collate Chinese_PRC_CS_AS_WS
    GOEXEC sp_dbcmptlevel 'pubs',80
    GOselect * from sysobjects where name = 'Wang' collate Chinese_PRC_CS_AS_WS
    GO
      

  4.   

    zjcxc(邹建)
    把qq留下
    我想加你