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