January 15, 2010 at 9:31 am
I was trying to do a simple join between two tables on a varchar field on same database and I get this error
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "SQL_Latin1_General_Pref_CP1_CI_AS" in the equal to operation.
January 15, 2010 at 9:50 am
Hi there,
That means that the columns that your joining have diferente collations. Use COLLATE to specify the collation to use in the join.
José Cruz
January 15, 2010 at 10:54 am
Do you really need to have different collations for the columns, that may have been an error when setting up the tables. look at the table structures and it may make sense to correct this or it will happen again.
January 15, 2010 at 1:08 pm
The collation on all servers involved is the same
January 15, 2010 at 2:12 pm
There is a default collation for the server.
There is a default collation for the database (which defaults to the collation for the server)
The default collation for the database will be applied to any column you add to a table UNLESS you explicitly specify a collation at the column level.
If the collation for a column is different to the collation of another column you will get a collation error
January 18, 2010 at 7:54 am
Still all the same, in fact one of the tables was from a linked server, checked the settings for that, still all the same. All at same SP level.
January 18, 2010 at 8:25 am
Hi there,
Could you post the scripts for the two tables you're tryiung to link?
In SSMS you can produce a script that includes collation settings, by right clicking the database, choose Tasks->Generate Scripts, then in the "Choose Script Options" make sure you change the "Script Collation" option to true.
José Cruz
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply