Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Randomly generated table name

0 views
Skip to first unread message

Ed S

unread,
Mar 13, 2002, 8:55:53 PM3/13/02
to
Hi All,

I want to generate a table name that begins with "Q_" and is random from
there on out, obviously making sure it doesn't already exist. Is there
a way to do this in a stored procedure? I know I can do it in ASP/SQL
but would prefer to encapsulate it completely within a SP. Any ideas?

Once I get the table name, I'm going to do a "SELECT INTO" with a subset
of data from the source table. This is going to be used as a quote system.

Thanks in advance,

--Ed

oj

unread,
Mar 13, 2002, 9:39:59 PM3/13/02
to
declare @tb sysname
select @tb= 'Q'+left(newid(),8)
select @tb

--
-oj
RAC v2 is coming...
http://rac4sql.home.attbi.com


"Ed S" <st...@sk8tape.com> wrote in message
news:3C900329...@sk8tape.com...

0 new messages