Reputation: 43913
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
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