2013-11-24 26 views
8

私はSQL Serverの2つのバージョン、つまり2005年と2008年R2を開発中です。2つのバージョンのSQL Serverを使用した照合競合

2008 R2より古いSQL Server 2005インスタンスに接続するリンクサーバーを作成しました。

私は、リモートサーバー上に存在

メンバー

id     name  
0002320   AOne Enterprises Motihari 
0002321   AOne Enterprises Siliguri 

別のテーブルの下のようである私のサーバー上の1つのテーブル(2008)を持っているが

id member_code agent rr_no txn_date amount 

各エージェントのアクティビティが含まれているI以下のクエリを実行しました

select top 5 * 
from [192.168.6.3].sync.dbo.agents_log 
where member_code IN 
     (select id from members where name like 'AOne Enterprises%') 

私はAOne Enterprisesのすべての活動ログを分散データベースに置いているので、リンクサーバーを作成する必要がありました。

私はこのエラーを得た:あなたが必要なもの

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

答えて

15

正確にわからないが、しかし、あなたが

SELECT TOP 5 * 
FROM [192.168.6.3].sync.dbo.agents_log 
WHERE member_code COLLATE SQL_Latin1_General_CP1_CI_AS 
IN (SELECT id 
    FROM members 
    WHERE NAME LIKE 'AOne Enterprises%') 

の下に行うことができます唯一の照合問題あれば、私はちょうどそれはおそらく、COLLATE順序SQL_Latin1_General_CP1_CI_ASを追加しました仕事

関連する問題