omega
omega

Reputation: 43913

SQL Server : cannot resolve collation conflict for equal to operation

In SQL Server 2012 I have this query:

select * 
from InquiryLog i
left join Employee e on i.QueriedByEmployeeName = (e.Firstname + ' ' + e.LastName)

but I get this error

Cannot resolve collation conflict for equal to operation.

How do I fix this?

Thanks

Upvotes: 0

Views: 2538

Answers (1)

Sean Lange
Sean Lange

Reputation: 33581

Using your query as an example you need to use the COLLATE keyword. Not sure what collations you have but something close to this should work for you.

select * 
from InquiryLog i
left join Employee e on i.QueriedByEmployeeName = (e.Firstname + ' ' + e.LastName) COLLATE SQL_Latin1_General_CP1_CI_AS

Upvotes: 1

Related Questions