Ramco Ramco

Ramco Ramco

  • 441
  • 3.4k
  • 522.6k

Invalid object name #temp0

May 4 2022 10:17 AM

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 #temp0

Thanks


Answers (2)