Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_L及由于排序规则不同

Posted John_杰

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_L及由于排序规则不同相关的知识,希望对你有一定的参考价值。

报错:Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_L

出错原因:

两个跨库的表的collation不一致

解决办法:在出错的任意列名后面加上collate chinese_prc_ci_as

 

例如:

 

        USE DBA;
INSERT INTO SUBJECTDB.ProDefine.ProjectInfo
        ( Code ,
          ProjectCityCode ,
          CnName ,
          Creator ,
          CreateTime ,
          ValidStatus ,
          SortNo ,
 VersionNo,
          VersionStartTime 
         )
SELECT NEWID(),
  CITY.Code,
  INS.项目名称,
  ‘BDD‘,
  GETDATE(),
  ‘1‘,
  ‘1‘,
  ‘1‘,
  GETDATE()
FROM BDD_PROJECTINFO_SHIYAN_INSERT INS 
INNER JOIN SUBJECTDB.Common.City CITY ON INS.项目城市 COLLATE chinese_prc_ci_as =CITY.CnName
WHERE INS.项目名称 COLLATE chinese_prc_ci_as NOT IN(SELECT CnName 
 FROM SUBJECTDB.ProDefine.ProjectInfo
 )

 

以上是关于Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_L及由于排序规则不同的主要内容,如果未能解决你的问题,请参考以下文章

The import java.io cannot be resolved

the import cannot be resolved

[Java] The imoprt XXX cannot be resolved

The import javax.servlet cannot be resolved

The import org.apache.commons.fileupload cannot be resolved

Eclipse打开项目后发生错误: The import javax.servlet cannot be resolved