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.
| Author |
Topic |
|
smccreadie
Aged Yak Warrior
505 Posts |
Posted - 2001-09-27 : 09:37:49
|
I'm attempting to use robvolk's code to create a dynamic cross-tab stored procedure, however the use of global temp tables is a problem because users will be trying to run this at the same time.Is there a way to append the @@SPID onto a global temp table name so that these tables are can be referenced uniquely?For example, the following doesn't work but you can see what I'm trying to do: DECLARE @TableName varchar(100)SET @TableName = '##test2'+@@SPIDDECLARE @SQL nvarchar(1000)SELECT @SQL = 'Create Table ' + @TableName + '(ID int)'Exec (@SQL) |
|
|
|
|
|