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
 morning - any help would be great

Author  Topic 

lemondash
Posting Yak Master

159 Posts

Posted - 2007-01-30 : 05:04:59
I have two servers both with different collation. Server A being SQL_Latin1_General_CP1_CI_AS and the live server and Server B being Latin1_General_CI_AS and a dev server. Now i have a load of data on the dev which i'm query to see if its on the live server.
select * from ServerA.Table1 where Col1 in
(select Col1 from ServerB.Table1)

I get this Error message.
Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-01-30 : 05:13:48
[code]
select * from ServerA.Table1 where Col1 in
(select Col1 collate SQL_Latin1_General_CP1_CI_AS from ServerB.Table1)
[/code]


KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-01-30 : 05:45:56
or this:

Select t1.*
from ServerA.DB..Table1 t1
JOIN ServerB.DB..Table1 t2
on t1.Col1 = t2.Col1 Collate SQL_Latin1_General_CP1_CI_AS


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -