gpt4 book ai didi

sql - 无法调用 char 上的方法

转载 作者:行者123 更新时间:2023-12-03 01:57:27 27 4
gpt4 key购买 nike

此错误似乎来自以下代码块。导致此错误的可能原因是什么?

Cannot call method on char

INSERT INTO #ActiveTerminals
SELECT DISTINCT a.TerminalId, SerialNumber, a.[LoadTime] [LastSale]
FROM Terminal INNER JOIN
(
SELECT DISTINCT Ticket.TerminalId,max(LoadTime) [LoadTime] FROM
Ticket with (NOLOCK)
JOIN ProductDenomination with (NOLOCK) ON (ProductDenomination.DenominationId = Ticket.DenominationId)
WHERE ProductDenomination.ProductId NOT IN (SELECT * FROM dbo.fn_MVParam(@sExcludedProducts)) AND
datediff(day,LoadTime,@dteActiveSalesEndDate) <= @iLastSoldWithinDays
GROUP BY TerminalId

UNION ALL

SELECT DISTINCT VarTicket.TerminalId, max(TransactionDate) [LoadTime] FROM
VarTicket with (NOLOCK)
WHERE VarTicket.ProductId NOT IN (SELECT * FROM dbo.fn_MVParam(@sExcludedProducts)) AND
VarTicket.TerminalId NOT IN (SELECT TerminalId FROM #ActiveTerminals)
AND datediff(day,TransactionDate,@dteActiveSalesEndDate) <= @iLastSoldWithinDays
GROUP BY TerminalId
)a ON (Terminal.TerminalId = a.TerminalId.TerminalId)
ORDER BY a.TerminalId, SerialNumber

最佳答案

对于这一行:

)a ON (Terminal.TerminalId = a.TerminalId.TerminalId) 

将其更改为:

)a ON (Terminal.TerminalId = a.TerminalId) 

关于sql - 无法调用 char 上的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20132378/

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