We have an application. It writes to a table in an oracle database.
We can't modify the application or the SQL being used by the application.
We'd like to have it instead write to a different table if a particular condition is true.
I've tried writing this using a trigger, and seem to have come unstuck with a "Mutating table" error.
Is there a better / different way to achieve this?
Not sure if we could use SQL rewritting either (we're on Oracle 12c).
We can't modify the application or the SQL being used by the application.
We'd like to have it instead write to a different table if a particular condition is true.
Code:
When inserting into Table A
Insert into Table B instead
Delete [Or don't commit] the row from Table A
End
I've tried writing this using a trigger, and seem to have come unstuck with a "Mutating table" error.
Is there a better / different way to achieve this?
Not sure if we could use SQL rewritting either (we're on Oracle 12c).