gpt4 book ai didi

sql - 无法解决 equal to 操作中 "Latin1_General_BIN"和 "Latin1_General_CI_AS"之间的排序规则冲突

转载 作者:行者123 更新时间:2023-12-04 17:13:13 27 4
gpt4 key购买 nike

I am getting the following error 

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



代码
SELECT @PARTS = SUM(Llines_1.[qty]) from pick 
RIGHT OUTER JOIN op AS Llines_1 ON pick.picknote =
Llines_1.[order_no] WHERE (pick.batchid = @batchid) AND (product = @product)
group by product Order By product

我已经厌倦了在 from 之前使用 COLLATE SQL_Latin1_General_CP1_CI_AS 但仍然遇到相同的错误。
SELECT @PARTS = SUM(Llines_1.[qty])  COLLATE SQL_Latin1_General_CP1_CI_AS
from pick RIGHT OUTER JOIN op AS Llines_1 ON pick.picknote = Llines_1.
[order_no] WHERE (pick.batchid = @batchid)
AND (product = @product) group by product Order By product

最佳答案

我假设 picknote 的排序规则和 order_no是不同的
尝试这个:

SELECT @PARTS = SUM(Llines_1.[qty])  
from pick
RIGHT OUTER JOIN op AS Llines_1 ON pick.picknote = Llines_1.[order_no] COLLATE SQL_Latin1_General_CP1_CI_AS
WHERE (pick.batchid = @batchid)
AND (product = @product) group by product Order By product

关于sql - 无法解决 equal to 操作中 "Latin1_General_BIN"和 "Latin1_General_CI_AS"之间的排序规则冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44695927/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com