Re: [sqlite] how to disable a trigger

2011-10-03 Thread Sam Carleton
Simon, Thank you! I have an odd ball case where the tables have two homes: One is a 'system' db one is a 'document' db. Depending on the case, the user can make changes to the document db, which in that case, needs the triggers, but in the case where the system db is being recloned to the

Re: [sqlite] how to disable a trigger

2011-10-03 Thread Simon Slavin
On 3 Oct 2011, at 4:12am, Sam Carleton wrote: > Ok, how do I list what a trigger is so that I can add it back once I want to > "reactive" it? To list all triggers: SELECT * FROM sqlite_master WHERE type='trigger' To list all triggers for a particular table: SELECT * FROM sqlite_master WHERE

Re: [sqlite] how to disable a trigger

2011-10-02 Thread Mr. Puneet Kishor
On Oct 2, 2011, at 10:29 PM, Igor Tandetnik wrote: > Sam Carleton wrote: >> Is there any way to "disable" a trigger in sqlite? > > If you have control over the trigger's definition, you could do something > like this: > > create trigger MyTrigger on ... > when

Re: [sqlite] how to disable a trigger

2011-10-02 Thread Igor Tandetnik
BareFeetWare wrote: > On 03/10/2011, at 2:12 PM, Sam Carleton wrote: > >> Ok, how do I list what a trigger is so that I can add it back once I want to >> "reactive" it? > > select SQL from SQLite_Master where name = 'trigger name' and Type = 'trigger' And be careful

Re: [sqlite] how to disable a trigger

2011-10-02 Thread Igor Tandetnik
Sam Carleton wrote: > Is there any way to "disable" a trigger in sqlite? If you have control over the trigger's definition, you could do something like this: create trigger MyTrigger on ... when (select enabled from TriggerControl where name='MyTrigger') begin ...

Re: [sqlite] how to disable a trigger

2011-10-02 Thread BareFeetWare
On 03/10/2011, at 2:12 PM, Sam Carleton wrote: > Ok, how do I list what a trigger is so that I can add it back once I want to > "reactive" it? select SQL from SQLite_Master where name = 'trigger name' and Type = 'trigger' Tom Tom Brodhurst-Hill BareFeetWare -- iPhone/iPad/iPod and Mac

Re: [sqlite] how to disable a trigger

2011-10-02 Thread Mr. Puneet Kishor
On Oct 2, 2011, at 10:12 PM, Sam Carleton wrote: > Ok, how do I list what a trigger is so that I can add it back once I want to > "reactive" it? You are looking to temporarily deactivate a TRIGGER, but there is no such mechanism. You could simply copy the code for the TRIGGER, then DROP it,

Re: [sqlite] how to disable a trigger

2011-10-02 Thread Sam Carleton
Ok, how do I list what a trigger is so that I can add it back once I want to "reactive" it? On Sun, Oct 2, 2011 at 9:07 PM, Igor Tandetnik wrote: > Sam Carleton wrote: > > Is there any way to "disable" a trigger in sqlite? > > DROP TRIGGER > --

Re: [sqlite] how to disable a trigger

2011-10-02 Thread Igor Tandetnik
Sam Carleton wrote: > Is there any way to "disable" a trigger in sqlite? DROP TRIGGER -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] how to disable a trigger

2011-10-02 Thread Sam Carleton
Is there any way to "disable" a trigger in sqlite? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users