Mahmoud ElMansy: knowledge meant to be free

Cannot resolve the collation conflict

I faced today this error when comparing two data in different databases
I got that error. “Cannot resolve the collation conflict between “Arabic_CI_AS” and “SQL_Latin1_General_CP1_CI_AS” in the equal to operation?“.
The solution was simple.


select column_name from TABLE_1 where column_name not in
( select convert(varchar, column_namecollate Arabic_CI_AS)
from SomeDataBase.dbo.TABLE_2 )


select column_name from TABLE_1 where column_name not in
( select column_name1 collate Arabic_CI_AS
from SomeDataBase.dbo.TABLE_2 )

This will resolve that error.