Friday, February 21, 2014

Cannot Resolve the Collation Conflict in WHERE Clause

Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
 
 
 
 select * from sometable1
 
 where user_id COLLATE DATABASE_DEFAULT in (
       select userid COLLATE DATABASE_DEFAULT from (
              SELECT distinct convert(nvarchar(100),[User]) [user],[UserId]
              FROM sometable2
         ) a
  )
 

No comments: