我正在尝试选择一个视图并将其与SQL Server 2012中的另一个表进行内部联接,但它显示此错误
消息468,级别16,状态9,第18 行在等于操作中无法解决“ SQL_Latin1_General_CP1_CI_AS”和“ Latin1_General_CI_AI”之间的排序规则冲突。
这是我的查询:
SELECT vpr.PARTNUMBER, vpr.DESCRIPTION, vpr.BUYER, vpr.[GL CLASS], vpr.[ABC CODE], vpr.TODAY, vpr.DAY1, vpr.DAY2, vpr.DAY3, vpr.DAY4, vpr.DAY5, vpr.[COO QTY], ROUND(vpr.[QOH-MSTORE], 0) AS [QOH-MSTORE], vpr.[QOH-COO], vpr.[QOH-SDV], ABS(ROUND(vpr.TOPUPQTY, 0)) AS [TOPUPQTY], (CASE WHEN ABS(ROUND(vpr.TOPUPQTY, 0)) < vpr.[QOH-SDV] THEN ABS(ROUND(vpr.TOPUPQTY, 0)) WHEN ABS(ROUND(vpr.TOPUPQTY, 0)) >= vpr.[QOH-SDV] THEN vpr.[QOH-SDV] END) AS [SDV TO PICK] FROM vw_PartsReport vpr LEFT JOIN (SELECT twudc.Description1 FROM tbl_WH_UserDefineCodes twudc WHERE twudc.UserDefineCodes = 'SO' GROUP BY twudc.Description1) AS [SOI] ON vpr.PARTNUMBER = Description1 WHERE vpr.TOPUPQTY <= 0
有人可以告诉我我的查询有什么问题吗?谢谢
所以要么
on vpr.PARTNUMBER collate Latin1_General_CI_AI = Description1
或者
on vpr.PARTNUMBER = Description1 collate Latin1_General_CI_AI
取决于哪一个是哪种排序规则。尝试一种方法,如果不合适,请尝试另一种方法,所需的信息就不会在您的帖子中告诉您它是哪一种。