Hi
IN below code it is giving above error
SQL
set @query = 'select Route, ' + @cols + ' into #temp0 from (select Loc,Quantity,name from #temp) x pivot
( Sum(quantity) for name in (' + @cols + ')) piv ';
select * from #temp0Thanks
Hi
IN below code it is giving above error
set @query = 'select Route, ' + @cols + ' into #temp0 from (select Loc,Quantity,name from #temp) x pivot
( Sum(quantity) for name in (' + @cols + ')) piv ';
select * from #temp0Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted May 4, 2022, 7:00 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted May 4, 2022, 1:52 PM EDT