Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible
Message
From
20/04/2001 08:02:17
Christian Bellavance
Université du Québec à Hull
Hull, Quebec, Canada
 
 
To
19/04/2001 23:24:37
Dave Sonier
Technologies Nter inc.
Gatineau, Quebec, Canada
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00497701
Message ID:
00497779
Views:
11
It will work if you put all the if code in a exec statement.

exec('if exists (select * from ' + @gBdTmp + '..sysobjects where id =
object_id(' + @gTableName + ')
exec (drop table ' + @gTableName + ')
else
something else')

If you have a lot of code in the if, it will be hard to maintain but it will work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform