SQL: 两个不同排序规则之间的排序规则冲突

SQL: Collation conflict between two different collations

我遇到了这个错误

"Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation." in SSMS.

我知道这意味着我的列没有相同的排序规则,我已经查找了解决方案并尝试更改排序规则。他们都有相同的排序规则,但我仍然得到相同的错误。

我该如何解决? 这是我的脚本:

`INSERT INTO EVoucherBatchMapping_New(EVoucherBatchValidityID,
                                    EventCode,
                                    ArrivalDate,
                                    DepartureDate,
                                    NoShowCharge)
SELECT                              EVoucherBatchValidityID,
                                    EventCode,
                                    ArrivalDate,
                                    DepartureDate,
                                    NoShowCharge
 FROM EVoucherBatchMapping
WHERE ArrivalDate BETWEEN '2015-01-01' AND GETDATE() 
AND EXISTS(SELECT * FROM PromotionEvent_New where EVoucherBatchMapping.EventCode = PromotionEvent_New.EventCode) `

您可以更改列定义以使用相同的排序规则或提供要在子查询中使用的排序规则:

SELECT * FROM PromotionEvent_New 
WHERE 
EVoucherBatchMapping.EventCode = PromotionEvent_New.EventCode
COLLATE SQL_Latin1_General_CP1_CI_AS;

SELECT * FROM PromotionEvent_New 
WHERE 
EVoucherBatchMapping.EventCode = PromotionEvent_New.EventCode
COLLATE Latin1_General_CI_AS;