排序规则之间的SQL冲突

时间:2016-09-01 15:25:06

标签: sql-server collation

我有此错误name="keyname[usuario]",我无法解决此问题

代码列在下面:

Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

1 个答案:

答案 0 :(得分:0)

在你的街道上:Difference between collation SQL_Latin1_General_CP1_CI_AS and Latin1_General_CI_AS

比较时出现排序规则冲突

[LinhaRI].[STstamp_Artigo] to [admnappl001].[cebi1].[dbo].[st].[ststamp]
or
[LinhaRI].[IDdocumento]    to [admnappl001].[cebi1].[dbo].[st].[design]

您需要检查所涉及的所有列的排序规则。您可以尝试在每次比较时强制执行:

SELECT *
FROM [LinhaRI] LR
WHERE IDdocumento COLLATE Latin1_General_CI_AS IN
(
    SELECT st.design COLLATE Latin1_General_CI_AS
    FROM [admnappl001].[cebi1].[dbo].[st] st
    WHERE st.ststamp = LR.STstamp_Artigo COLLATE Latin1_General_CI_AS
);