This error seems to be coming from the following block of code. what is the possible cause of this error?
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
For this line:
)a ON (Terminal.TerminalId = a.TerminalId.TerminalId)
change it to this:
)a ON (Terminal.TerminalId = a.TerminalId)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With