conflict between "Chinese_PRC_CI_AI" and "Chinese_PRC_CI_AS" in the equal to operation

时间:2023-08-29 13:33:02

在SQL SERVICE做关联查询的时候遇到了“conflict between "Chinese_PRC_CI_AI" and "Chinese_PRC_CI_AS" in the equal to operation“这个错误,如下图:

conflict between "Chinese_PRC_CI_AI" and "Chinese_PRC_CI_AS" in the equal to operation

导致这个问题的原因是在表创建的时候,两个字段的排序规则不一样导致的。如图:

Sales Table:

conflict between "Chinese_PRC_CI_AI" and "Chinese_PRC_CI_AS" in the equal to operation

Material Table:

conflict between "Chinese_PRC_CI_AI" and "Chinese_PRC_CI_AS" in the equal to operation

解决方法,是在对比条件后面增加  collate Chinese_PRC_90_CI_AI 的转义

如:

FROM Sales inner join Material on Sales.MaterialNumber =Material.MaterialNumber collate Chinese_PRC_CI_AI

保持等号两边的排序规则一致即可。