Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 768
Nation Avatar asked Nov 21 '13 21:11

Nation


1 Answers

For this line:

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

change it to this:

)a ON (Terminal.TerminalId = a.TerminalId) 
like image 52
RBarryYoung Avatar answered Nov 13 '22 09:11

RBarryYoung