Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible
Message
From
19/04/2001 23:24:37
Dave Sonier
Technologies Nter inc.
Gatineau, Quebec, Canada
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Is it possible
Miscellaneous
Thread ID:
00497701
Message ID:
00497701
Views:
45
Hi,

I got a error code message when i run that code in Query Analyzer! Why ? is it possible to use a concatenation in exists function ?

Thank in advance...

Here's the code:
===============================================================
declare @gTableName varchar(1024)
declare @gUser varchar(30)
declare @gBdTmp varchar(50)

set @gBdTmp = (select VALUE from SYST_PARAM Where CD_PARAM = « BD_TEMP »)

set @gUser = user
set @gTableName = @gBdTmp + « . » + @gUser + « .Table1 »


if exists ( « select * from « + @gBdTmp + « ..sysobjects where id =
object_id(« + @gTableName + « ) »)

exec (« drop table « + @gTableName)
=================================================================
Next
Reply
Map
View

Click here to load this message in the networking platform