我正在尝试跨两个链接服务器编写查询。使用适当的登录设置链接后,我收到此整理错误:
无法解决等于操作中“SQL_Latin1_General_CP1_CI_AS”和“Latin1_General_CI_AS”之间的排序规则冲突。
这对我来说是新的,但它看起来像一个字符集冲突,所以我用谷歌搜索它并发现了可以添加到我的加入的 collate 命令。但是我都试过了
va ON V_ID1 = c1.strData COLLATE Latin1_General_CI_AS
和
va ON V_ID1 = c1.strData COLLATE SQL_Latin1_General_CP1_CI_AS
而且似乎都没有解决错误。我究竟做错了什么?
编辑:整个查询太大而无法发布并期望人们过滤,但这里是相关位:
select
rel.intParentAttributeId as intItemId,
case va.type
when 'SM' then 120000000
when 'FB' then 110000000
when 'RO' then 100000000
when 'SP' then 90000000
when 'A' then 80000000
when 'D' then 70000000
when 'P' then 60000000
when 'SR' then 50000000
when 'FN' then 40000000
when 'RL' then 30000000
when 'VO' then 20000000
when 'RE' then 10000000
end
+
rel.intParentAttributeId
as fltStrength
from
AttributeMap ky
join Catalogue c1 on c1.intRowId=ky.intChildAttributeId and c1.intAttributeTypeId=@intsimilarAtt
join
[SQLSERVERNAME].[SchemaName].dbo.VidAssc
va on V_ID1 COLLATE SQL_Latin1_General_CP1_CI_AS = c1.strData COLLATE SQL_Latin1_General_CP1_CI_AS
join Catalogue c2 on c2.strData=V_ID2 and c2.intAttributeTypeId=@intsimilarAtt
join AttributeMap rel on rel.intChildAttributeId = c2.intRowId
join @tmpSeeds s on s.intItemId = ky.intParentAttributeId
group by rel.intParentAttributeId,va.Type
)sqi
干杯,马特