Disabling triggers

From: Phil Davy (anonymous_at_discussions.microsoft.com)
Date: 10/01/04


Date: Fri, 1 Oct 2004 04:27:22 -0700

Does anyone know if there is/are a T-SQL command(s) to
temporarily disable a trigger? (a bit like SET ANSI
NULLS OFF/ON) ?

All I can think of doing is editing the existing trigger
with a "return" statement at the start.

Or I could drop it, however then I will need to recreate
it.

So if possible I prefer the solution of temporily
disabling it.

Can anyone help please?

Thanks
Phil



Relevant Pages

  • Re: Use a trigger to remove NULL values?
    ... which are currently removed by using standard SQL on two ... If you want the db to simply ignore insert statements containing nulls, a trigger would work. ... That's kind of odd behavior, ...
    (comp.databases.oracle.server)
  • Re: Prevent Duplicates in a field
    ... since the last time that I wrote a trigger but you can ask in the ... >DisplayAssetNumber Set to No duplicates but each allows nulls. ... >happend once there is a null entry in either of the no diplicate fields. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Row Level Trigger
    ... You can use the inserted table to check for NULLs and update them ... We have a trigger in Oracle that will change the NULL to ... > We are converting to SQL Server and the code takes much longer to run ...
    (microsoft.public.sqlserver.programming)
  • Re: How to prevent writing a record when unwanted data is detected?
    ... Your trigger will fail if more than one row is inserted. ... Just declare the column NOT NULL if you want to prevent NULLs being ... It looks like you want to accept the valid rows in the UPDATE/INSERT but not ... statements so that they don't insert invalid data. ...
    (microsoft.public.sqlserver.programming)
  • Geänderte Spalten in Trigger
    ... Wie kann ich in einem Trigger (T-SQL) herausbekommen welche Spalten ...
    (microsoft.public.de.sqlserver)