简体   繁体   English

SQL Server 2000 DTS-无法解决归类冲突等于操作

[英]SQL Server 2000 DTS - Cannot resolve collation conflict for equal to operation

I have a SQL Server 2000 DTS package. 我有一个SQL Server 2000 DTS程序包。

One of the steps of this package has the following SQL: 该软件包的步骤之一具有以下SQL:

SELECT *
FROM [Crocus_Limited$OrderRequestDetail]
WHERE (rep_updated > GETDATE() -2) 
AND NOT EXISTS

(SELECT OrderID 
FROM NavisionUpgrade.navision4.dbo.[WEBOrderDetails] rd 
WHERE rd.OrderID =     [Crocus_Limited$OrderRequestDetail].OrderID 
AND rd.NavisionItemNo = [Crocus_Limited$OrderRequestDetail].NavisionItemNo )

It is failing- giving me error: cannot resolve collation conflict for equal to operation. 它正在失败-给我错误:无法解决等于操作的排序规则冲突。

This DTS basically moves data from one DB to another (located in different geographical locations) 此DTS基本上将数据从一个DB移动到另一个DB(位于不同的地理位置)

how can i alter the above query to resolve this? 我该如何更改以上查询来解决此问题?

One or both of your join columns has on of the char datatypes (char,nchar,varchar,nvarchar) which is stored in incompatible collations in each database. 您的一个或两个连接列都具有一个char数据类型(char,nchar,varchar,nvarchar),这些数据类型存储在每个数据库的不兼容排序规则中。

You can specify the collation to use in any string comparison. 您可以指定在任何字符串比较中使用的排序规则。 The easiest way to do it is to specify the default collation of the machine on which the query is running (I'm guessing that NavisionItemNo is the problem column): 最简单的方法是指定运行查询的计算机的默认排序规则(我猜NavisionItemNo是问题列):

...AND rd.NavisionItemNo collate database_default = [Crocus_Limited$OrderRequestDetail].NavisionItemNo collate database_default )

EDIT 编辑

Is OrderID a varchar column too? OrderID也是varchar列吗? If so, try 如果是这样,请尝试

...WHERE rd.OrderID collate database_default = [Crocus_Limited$OrderRequestDetail].OrderID collate database_default
AND rd.NavisionItemNo collate database_default = [Crocus_Limited$OrderRequestDetail].NavisionItemNo ) collate database_default

as the two former posts mention you have to use the collate attribute to every nonumeric column but have a look a the collation of the target db and use this collation (eg SQL_Latin_CI_AS). 如前两篇文章所述,您必须对每个非数字列使用collat​​e属性,但要查看目标数据库的排序规则并使用该排序规则(例如SQL_Latin_CI_AS)。 Be aware that a table can have it's own collation even a column can have annother collation, so have a deep look in your definitions. 请注意,表甚至可以具有自己的归类,甚至一列也可以具有另一个归类,因此请对定义进行深入了解。

Peace and good luck Ice 和平与好运冰

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL Server:无法解决归类冲突等于操作 - SQL Server : cannot resolve collation conflict for equal to operation 无法解决equal to操作中“SQL_Latin1_General_CP1_CI_AS”和“Chinese_PRC_CI_AS”的排序冲突 - Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Chinese_PRC_CI_AS" in the equal to operation 等于操作无法解决“ Latin1_General_CI_AS”和“ SQL_Latin1_General_CP1_CI_AS”之间的排序规则冲突 - Cannot resolve the collation conflict between “Latin1_General_CI_AS” and “SQL_Latin1_General_CP1_CI_AS” in the equal to operation 无法解决排序规则冲突 - Cannot Resolve Collation Conflict SQL Server 2008排序规则冲突 - 如何解决? - SQL Server 2008 Collation conflict - how to resolve? DTS程序包,SQL Server 2000 - DTS packages, SQL Server 2000 SQL Server-选择查询-内部联接-错误消息:无法解决排序规则冲突 - SQL Server - Select Query - Inner Join - Error message: Cannot resolve the collation conflict 排序规则冲突sql server - collation conflict sql server 无法解决与此之间的排序规则冲突 - Cannot resolve the collation conflict between this and that 临时表整理冲突 - 错误:无法解决 Latin1* 和 SQL_Latin1* 之间的整理冲突 - Temp Table collation conflict - Error : Cannot resolve the collation conflict between Latin1* and SQL_Latin1*
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM