Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Cannot resolve the collation conflict?!

Author  Topic 

raysefo
Constraint Violating Yak Guru

260 Posts

Posted - 2011-07-18 : 08:58:07
Hi,

I am trying to join two tables as follows.VendorNo is varchar and VendorID is integer. I am getting this error "Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Turkish_CI_AS" in the equal to operation."
Bytheway, I am using SQL Server 2008.

How can I fix this?

Best Regards.
...
mbv.VendorNo = LEFT(vr.VendorID,6)

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-07-18 : 09:01:17
cast one of them to the other one


mbv.VendorNo = LEFT(vr.VendorID,6) COLLATE SQL_Latin1_General_CP1_CI_AS


assuming that the collation for VendorNo is SQL_Latin1_General_CP1_CI_AS


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

raysefo
Constraint Violating Yak Guru

260 Posts

Posted - 2011-07-18 : 09:07:31
Hi khtan,

It did NOT give the error but did NOt bring the results either?!
Go to Top of Page

raysefo
Constraint Violating Yak Guru

260 Posts

Posted - 2011-07-18 : 09:34:08
Bytheway, this is a linked server connection between MS SQL and Oracle 10g.VendorNo is on MS SQL and VendorID is on Oracle.
Go to Top of Page
   

- Advertisement -