更新查询时的 MSSQL 排序规则

MSSQL Collation on Update Query

我们有一个带有链接服务器的 MSSQL 服务器,其中包含一些视图。我们正在尝试使用来自链接服务器的视图中的值更新主服务器上 table 的字段。

当我们执行查询时,我们收到有关排序规则的错误:

Mens. 468, Nivel 16, Estado 9, Línea 6
No se puede resolver el conflicto de intercalación entre "Modern_Spanish_100_CI_AS" y "Modern_Spanish_CI_AS" de la operación equal to.

我们需要做的一个更新示例:

Update therefore.dbo.thecat10

Set alias = (SELECT therefore.dbo.vClientes.alias
                        From therefore.dbo.vClientes
                        Where therefore.dbo.thecat10.codigo=therefore.dbo.vClientes.código)
WHERE therefore.dbo.thecat10.codigo = ( SELECT therefore.dbo.vClientes.código
                               FROM therefore.dbo.vClientes
                               Where therefore.dbo.thecat10.codigo = therefore.dbo.vClientes.código)

我尝试在比较后添加整理 Modern_Spanish_CI_AS,但它不起作用。

Update cat set
  alias = cli.alias
FROM therefore.dbo.thecat10 cat
INNER JOIN therefore.dbo.vClientes cli
  on cli.código COLLATE Modern_Spanish_CI_AS = cat.codigo
WHERE cat.alias != cli.alias COLLATE Modern_Spanish_CI_AS