Error converting data type varchar to numeric dynamic pivot

后端 未结 2 1960
刺人心
刺人心 2021-01-29 07:03

I am getting an error described in the title where my code looks like this:

declare
@cols numeric(10,0),
@sql numeric(10,0)

select @cols = isnull(@cols + \', \'         


        
2条回答
  •  走了就别回头了
    2021-01-29 07:20

    You've declared @cols as numeric(10,0), but you're trying to assign text to it.
    Probably need to declare it as nvarchar(max).


    P.s. by concatenating AmountPayd you're suppose to get a list of customers?

提交回复
热议问题