Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 about http://www.sqlteam.com/item.asp?ItemID=2955

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-06 : 20:44:25
eric writes "Using SQL Server 2000, I tried to solve the concurrent use problem using the proposed '##pivot_'+@stamp where @stamp uses getdate().
It works up to the following line:
SELECT @sql=@sql + '''' + convert(varchar(100), pivot) + ''' = ' + stuff(@sumfunc,charindex( '(', @sumfunc )+1, 0, ' CASE ' + @pivot + ' WHEN ' + @delim + convert(varchar(100), pivot) + @delim + ' THEN ' ) + ', ' FROM ##pivot

I can not find a way to replace ##pivot with '##pivot_'+@stamp or a variation.

I would really appreciate some help.
Thanks"
   

- Advertisement -