Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Insert into a table within a trigger that raises an exception...

Re: Insert into a table within a trigger that raises an exception...

From: Peter Rak <prak_at_vsz.sk>
Date: 1997/12/02
Message-ID: <3483C03A.910F0406@vsz.sk>#1/1

Hi,
Try to read about PRAGMA EXCEPTION_INIT.

            Peter.

Doug Swanson wrote:

> Can/how would you do this...
>
> I have an before insert trigger on a table that maintains a foreign key
> column that the application is unaware of. Since I can't rely on the
> 3rd party app always sending its columns in the correct format, I wanted
> to check for certain errors and log them.
>
> I test for my error conditions, raise a user defined exception and all
> raise_application_error. This stops the insert from occurring (good),
> but rolls back ANY changes that occurred during the execution of the
> trigger (bad) (e.g. a table which logs the invalid insert) which is
> what you'd expect it to do.
>
> Is there any other way to stop the insert from occurring besides
> raise_application_error, that would allow the insert into my error log
> to happen?
> -or-
> Is there some other way to have what happens in a trigger NOT rolled
> back when an exception is raised.
>
> Thanks
> -Doug
Received on Tue Dec 02 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US