CRice
CRice

Reputation: 12567

COLLATION Conflict For Equal To Operation Sql Server 2000

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?

Upvotes: 1

Views: 2962

Answers (1)

MartW
MartW

Reputation: 12538

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

Upvotes: 1

Related Questions