Home » SQL & PL/SQL » SQL & PL/SQL » Triggers failling.......
Triggers failling....... [message #280790] Wed, 14 November 2007 14:16 Go to next message
dasgupta.amitava@gmail
Messages: 32
Registered: November 2007
Member
Hi,
I have set up a row-level trigger on a table, which is having another row-level trigger from begining. The problem is that in some cases my trigger is failing to update a table. So my question is "Is it possible that one of the two triggers sitting on the same table can fail, while the other works fine???". Though the question may look like a stupid one but I am really confused!!!!
No way I can check that the other triggre is failling or not, so considering that it ran successfully I am posting this question. This issue leading two tables going out of syn....

Embarassed Mad Please help...


Thanks in advance
Amitava...........
Re: Triggers failling....... [message #280794 is a reply to message #280790] Wed, 14 November 2007 14:21 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

Is it possible that one of the two triggers sitting on the same table can fail, while the other works fine???"

Yes, 2 pieces of code, why must they be related?

What do you mean with "fail"?

Regards
Michel

[Updated on: Wed, 14 November 2007 14:21]

Report message to a moderator

Re: Triggers failling....... [message #280806 is a reply to message #280794] Wed, 14 November 2007 15:57 Go to previous messageGo to next message
dasgupta.amitava@gmail
Messages: 32
Registered: November 2007
Member
By fail I meant to say that one trigger never fires while the other gets fired. Both having the same On Insert or Update event..... Sad I know the qs is idiotic but still I want to get an view of others....
Re: Triggers failling....... [message #280807 is a reply to message #280790] Wed, 14 November 2007 16:17 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW posting guidelines as stated in URL above.

You've posted nothing of substance.

Reality is what reality is.

If a trigger is not firing, then there is a reason for it not firing (or firing & not doing what you expect it to do).

Without table definitions, test data & actual trigger code; You're On Your Own (YOYO)!
Re: Triggers failling....... [message #280869 is a reply to message #280806] Thu, 15 November 2007 01:21 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If bothe the triggers are on the same event, then both the triggers will have fired.
What's most likely is that one of them is erroring and you're not noticing, or one of them has some sort of condition inside it that isn't being met.

If you've put some sort of 'WHEN OTHERS THEN NULL;' exception handler in them then that will bury any errors quite effectively.
Re: Triggers failling....... [message #281048 is a reply to message #280869] Thu, 15 November 2007 09:11 Go to previous messageGo to next message
dasgupta.amitava@gmail
Messages: 32
Registered: November 2007
Member
Hi JRowbottom,
Thanks for your comment...there was a single exception with a do nothing logic. I was missing that out every time as that's the rarest case. Though the fault was totally mine, since I should not ignore any case. I apologize to ALL for the posting of this this silly question. Smile

Amitava..........
Re: Triggers failling....... [message #281049 is a reply to message #281048] Thu, 15 November 2007 09:28 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks to remind us the hell of "when others then null;"

Regards
Michel
Previous Topic: Outer Join help
Next Topic: display records for Dates every 7 days
Goto Forum:
  


Current Time: Sat Dec 10 07:06:30 CST 2016

Total time taken to generate the page: 0.09807 seconds