Is it possible to have part of a table name used in a CREATE statement
contained in a variable? Here's what I'd like to do, although
obviously the syntax of this isn't quite right or I wouldn't be here
asking:
DECLARE @TblPrefix char (3)
SET @TblPrefix = 'tst'
CREATE TABLE @TblPrefix + TestTable (col1 int)
The point there is to have a table named tstTestTable
The reason I need to do this is that my ISP will only give me one
database to work with and I'd like to have two copies of the
application I'm developing running at the same time. So I'd like to
run the sql script that creates the tables with TblPrefix set to "dev"
and then run it again with TblPrefix set to "liv"
thanks
eric