Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.9k

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)