等于操作 Sql Server 2000 的排序规则冲突
我在存储过程中存在排序规则冲突,我正在尝试运行以实时发送它...已在此处进行解释
SQL Server 2000 DTS - 无法解决等于操作的排序规则冲突
有没有办法解决该问题,而无需在旁边写入 COLLATE database_default每个问题都等于比较并进行某种全局命令或设置?或者,在生成脚本时可能有一些选项可以预先完成排序规则标签?
I have a collation conflict in a stored procedure I am trying to run to send it live... it has been explained here
SQL Server 2000 DTS - Cannot resolve collation conflict for equal to operation
Is there a way to fix the issue without writing the COLLATE database_default next to every problem equals comparison and do some sort of global command or setting? Or maybe there are some options when generating the scripts to have the collation tags pre done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
恐怕没有全局命令/设置。
如果您从企业管理器为对象生成脚本,它将自动包含各个列的列排序规则,这可能是导致错误的原因。然后你也许可以对它们进行查找/替换。但是,如果您只是运行一个查询,将两个数据库中的数据与使用不同排序规则的对象连接起来,那么情况会更加复杂。包含临时表甚至可能会引入第三种排序规则。
基本上,COLLATE database_default 选项是执行操作的快速方法。缓慢的方法是将所有内容更新为具有相同的排序规则。
这两篇文章中有一些很好的信息,包括有关如何更改现有对象的排序规则的说明。
注意与 SQL-Server-2000 混合排序规则---第 1 部分
谨防混合排序规则第 2 部分---转换排序规则
There's no global command/setting, I'm afraid.
If you're generating scripts for objects from Enterprise Manager, it will automatically include the column collation for the individual columns which are possibly the cause of your error. You could then perhaps do a find/replace on those. But if you're just running a query joining data from two databases with objects using different collations, then it's more complicated. Including temporary tables might even introduce a third collation into the mix.
Basically, the COLLATE database_default option is the quick way of doing things. The slow way is updating everything to have the same collation.
There's some good info in these two articles, including instructions on how to change collations on existing objects.
Beware-of-Mixing-Collation-with-SQL-Server-2000---Part-1
Beware-of-Mixing-Collations-Part-2---Converting-Collations