简体   繁体   中英

Cannot call methods on char

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) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM