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

I am trying to check for duplicates between two tables and created a linked server and then created the following query but I keep getting the following error and was wondering if there is a better way to do this or how to fix this error:

  select A.siteid
  from siteids A, DBSERVER02.PostFeeds.dbo.siteids B
  where A.siteid = B.siteid

I was also told that this query will take a long time to run given that I have over 100 millions of records in both tables.

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
vbNewbie
  • 3,291
  • 15
  • 71
  • 155

1 Answers1

3

Try using "collate" clause after one of the fields. If you don't know which is which, just type:

where A.siteid collate database_default = B.siteid collate database_default
AdamL
  • 12,421
  • 5
  • 50
  • 74