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 |
|
jstrangeway
Starting Member
9 Posts |
Posted - 2005-03-31 : 09:07:37
|
Can anyone tell me how to create a table name based off of a variable without putting the whole statement in a string and executing the whole line. @tablename = 'Joe'Select *Into @tablenamefrom sourcetableAny help would be appreciatedThanksJames |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2005-03-31 : 09:10:52
|
| You can't, you have to use dynamic SQL as you were saying you don't want to do.But you should reconsider this anyway. Creating tables like this is a fast way to ensuring a loss of control over your server.-------Moo. :) |
 |
|
|
|
|
|