pman
Grasshopper
Points: 14
More actions
September 11, 2002 at 7:48 am
#79700
I need to create and drop triggers on specified table as and when the user turns auditing on and off for these tables.
MSDN says that you may not use CREATE TRIGGER within a CREATE PROCEDURE.
Any ideas on how to get round this ?
Cheers
Paul
September 11, 2002 at 7:57 am
#436308
No Worries I have used ,
exec sp_executesql @sql
where @sql contains the create trigger statement.
Mike2265
Right there with Babe
Points: 753
September 12, 2002 at 12:11 am
#436363
Instead of deleting and recreating it why don't you just disable and reenable.
ALTER TABLE <tablename> DISABLE TRIGGER <triggername>
ALTER TABLE <tablename> ENABLE TRIGGER <triggername>
cheers,
Mike
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply