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)
 Create a Table with a random number as the name

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-06-05 : 10:04:43
cliff writes "How can I create a table in ASP / SQL with a random number as part of its name? The database is already created and is named "test".


i.e. - get a random number and put it in the variable
variable1 = randomnumber

then
strSQL = "CREATE TABLE" & " " & "tableID" & " " & variable1 & "(" etc.


i am stumped"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-05 : 10:17:26
Why do you want to create table thru application? Thats not good idea



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-05 : 10:25:29
What is the purpose of this ?

Is it as temporary table ? Just create the table name prefix with '#'

For random number, you can checkout rand() or newid()



KH

Go to Top of Page
   

- Advertisement -