SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Collation Conflict
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

satheesh
Posting Yak Master

United Kingdom
151 Posts

Posted - 06/20/2012 :  10:58:11  Show Profile  Reply with Quote
Dear all,

I try to establish simple join between two table and i am getting

select policy.policynumber ,filter.email
from policy
inner join filter on filter.policynumber = policy.policynumber

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

How to fix this issue.
Any help will be highly appreciated.

Thanks

Regards,
SG

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 Posts

Posted - 06/20/2012 :  11:18:16  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
col1 = col2 collate Latin1_General_CI_AS

Or better change one of the columns so you have a consistent collation.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Edited by - nigelrivett on 06/20/2012 11:19:29
Go to Top of Page

prett
Posting Yak Master

USA
203 Posts

Posted - 06/21/2012 :  02:25:38  Show Profile  Visit prett's Homepage  Reply with Quote
It seems that the tables in join are having different collations. There are three solutions to solve this issue:

1. If possible change the database collation.
2. If possible change the server collation.
3. To allow specific queries to run despite the difference on collations, you need to modify those queries and include the COLLATE or COLLATE database_default clause when comparing string columns with different collations.

Ref: http://www.sqlcoffee.com/Troubleshooting075.htm
Go to Top of Page

granuharmot
Starting Member

31 Posts

Posted - 09/23/2014 :  05:21:08  Show Profile  Reply with Quote
unspammed
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000