Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
CLages
Posting Yak Master
116 Posts |
Posted - 2005-04-05 : 15:31:57
|
| hi, a simple big question.I have one table Named DUPLICATA with several columns (ex 30 columns)and i Have a Trigger in this table (Update and Delete) that Updatea Table LOGDUPLICATAin other words each Update ou delete in DUPLICATA i Insert the old record in LOGDUPLICATAeverything works fine.But i have 7 Diferents Programs one Update 5 columns, othes 7columns, another one 1 column, etcin each Program the Triggers is FIRED.the question?Is there a way to do something like this?SET TRIGGERS ON SET TRIGGERS OFF BECAUSE IN some Programa i would not like to FIRED the trigger.tks C. Lagesfull time NetCobol x SQL x Cristal Reports |
|
|
rfrancisco
Yak Posting Veteran
95 Posts |
Posted - 2005-04-05 : 15:37:02
|
| ALTER TABLE YourTable DISABLE TRIGGER ALLandALTER TABLE YourTable ENABLE TRIGGER ALL |
 |
|
|
CLages
Posting Yak Master
116 Posts |
Posted - 2005-04-06 : 08:45:14
|
| In this case none of my programs updating my Table DUPLICATA ,will fire the Trigger.I want that in some programs the TRIGGERS is Fired and only one Dont. in Create Trigger HELP on BOL there are this optionIF UPDATE ( column ) the trigger will be fired only if desired Column is Updatedi am looking for IF UPDATE ( column ) DONT FIRE THE TRIGGERThis is because the table has too many columns than is easieruse the negative.IF UPDATE ( columnX ) do nothingotherwise i have to writeIF UPDATE ( columna , Columnb, columnc .....column80 etc ) tksanywayC. Lages |
 |
|
|
|
|
|