Saturday, July 23, 2011

Fix: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.

How to fix
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.

Use COLLATE DATABASE_DEFAULT after your join field.

select * from Tempprdetail
left outer join rk0901 on gmobj COLLATE DATABASE_DEFAULT =gl_OBJ COLLATE DATABASE_DEFAULT
and gmmcu COLLATE DATABASE_DEFAULT =HOME_BU COLLATE DATABASE_DEFAULT

No comments: