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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-09-26 : 07:38:16
|
| Dipu writes "How to create a temperory table in sql with dynamic tablenamelike set @TableName = '#table1'@sql = 'Create table '+ @TableName +' ( userId integer)'" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-09-26 : 07:38:28
|
| Why do you want to do this? |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-09-26 : 07:58:55
|
| Are you trying to get the userid from a particular Table and want to create the TAble.. for each userid???Chirag |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-09-26 : 09:35:24
|
| It looks like you already have the code to do it, except for the EXECUTE statement.CODO ERGO SUM |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-09-26 : 10:28:21
|
quote: Why do you want to create seperate table for each user?
because he works for one of the consulting firms around my work (or at least wants to code like them) [Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|