Reputation: 1885
Is there a way to write something like
DISABLE TRIGGER WHERE object_id = x
or another way not to hardcode the trigger's name?
Upvotes: 1
Views: 45
Reputation: 8697
declare @obj sysname = object_name(xxx);
declare @sql varchar(4000) = 'disable trigger ' + @obj
exec(@sql)
?
Upvotes: 3