Cannot resolve the collation conflict...

Published Fri, Nov 26 2010 3:29 PM

Ever tried to do a join on text columns? Like this:

SELECT * from LocationAustralie la 
left join steps s on la.StepText = s.Value 

If your tables have different collations you get the error message:

Msg 468, Level 16, State 9, Line 2: Cannot resolve the collation
conflict between "Latin1_General_CI_AS" and 
"SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

 

Two of my colleagues had this problem in a single week and asked whether I had a solution. I have…

So here is the solution: the keyword COLLATE.

Just add the collate to one of the columns on the join

SELECT * from LocationAustralie la
left join steps s on la.StepText = s.Value collate Latin1_General_CI_AS

Happy Querying!

Comments

# ghd uk said on Wednesday, July 20, 2011 3:04 AM

<a href="www.ghds-sale-uk.com/">ghd uk</a> ghd limited edition ghd 2010 straighteners <a href="www.ghds-sale-uk.com/">ghd uk</a> coach factory outlet ghds limited edition def65256342 ghds iv styler ghd uk <a href="www.coachoutletonline.us/">coach factory outlet</a> ghd uk

# ghd uk said on Wednesday, July 20, 2011 3:04 AM

dheruj thgf

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 7 and 6 and type the answer here: