2

I have a query that produces this error:

Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "SQL_Icelandic_Pref_CP1_CI_AS" in the equal to operation.

I am joining on an OPENQUERY when I get this error and I cannot seem to tell why?

Please let me know what kind of other contexts could be helpful in answering this question.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
ejj
  • 172
  • 2
  • 3
  • 18
  • 1
    It means the database you are connecting to via OPENQUERY uses a different collation than your local database, and Sql Server doesn't know how to convert and compare between them. – Joel Coehoorn Aug 02 '16 at 17:28
  • See also [What does collation mean?](http://stackoverflow.com/q/4538732/1260204) – Igor Aug 02 '16 at 17:29
  • @renevogt I thought this was a duplicate at first, too, but this is more complicated than that question. It uses different families of the collation rather than two latin collations, and across different databases rather than within the same table, such that the answers there only help a little with this question. – Joel Coehoorn Aug 02 '16 at 17:30
  • @JoelCoehoorn I'm testin `...WHERE fieldname COLLATE DATABASE_DEFAULT = otherfieldname COLLATE DATABASE_DEFAULT` to see if this works for my case – ejj Aug 02 '16 at 17:36
  • You can use this to see colltes supported : **SELECT Name, Description FROM fn_helpcollations()** – Ilyes Aug 02 '16 at 17:40

0 Answers0