以下代码:
SELECT *
FROM portal.workflow AS w
INNER JOIN portal.workflow_type AS wt
ON w.workflow_type_id = wt.workflow_type_id
WHERE wt.doc_type IN ('CentreEV', 'Expenditure Voucher')
AND w.varchar_1 NOT IN ( select f1.BAT_NAME as 'DocumentFile'
from openquery(QICRE_F1, 'select *
from dbo.IO_GLF_BAT_CTL_VW
where bat_stat = ''S'' ') f1
where f1.USAGE_STAT = 'A' )
抛出以下错误:
消息 468,级别 16,状态 9,第 1 行无法解决等于操作中“Latin1_General_CI_AS”和“Latin1_General_CS_AS”之间的排序规则冲突。
我尝试使用以下方法解决此问题,但收到语法错误。我不知所措(即使在查看文档之后)在这种情况下应该如何完成:
SELECT *
FROM portal.workflow AS w
INNER JOIN portal.workflow_type AS wt
ON w.workflow_type_id = wt.workflow_type_id
WHERE wt.doc_type IN ('CentreEV', 'Expenditure Voucher')
AND COLLATE Latin1_General_CI_AS w.varchar_1 NOT IN
( select f1.BAT_NAME as 'DocumentFile'
from openquery(QICRE_F1, 'select *
from dbo.IO_GLF_BAT_CTL_VW
where bat_stat = ''S'' ') f1
where f1.USAGE_STAT = 'A' )