Problem:
I was trying to migrate data from one catalog to the other and hit this error.
insert claim
select
*
from [MANNHEIM].dbo.CLAIM c
Inner Join Exercise e
on e.Exercise_ID = c.EXERCISE_ID
where e.EXERCISE_ID is not null
The problem was that the field in the source table had a different default format then
the target field. The way around was to force the query to use a common default collation.
Solution:
insert claim
select
from [MANNHEIM].dbo.CLAIM c
Inner Join Exercise e
on e.Exercise_ID COLLATE DATABASE_DEFAULT = c.EXERCISE_ID COLLATE DATABASE_DEFAULT
where e.EXERCISE_ID is not null
Source:
http://blog.sqlauthority.com/2007/06/11/sql-server-cannot-resolve-collation-conflict-for-equal-to-operation/
No comments:
Post a Comment