TYU said...I believe that:
was already possible in Oracle 7.3 !!
Is it really new? I don't believe it.
Yes. I should have checked it out. I've raised an SR with Oracle about this point and mentioned it in the article. I assume it's a mistake in the PL/SQL manual.
The answer is that you can now explicitly ENABLE or DISABLE a trigger at creation time.
Peter Hitchman said...Good article, that clearly explains compound triggers. So off I went and did an implementation with them on a RHL platform. It was going OK until one of the JDBC programmes tried to insert more than 3 rows in a transaction and the rules was a ORA-07445 error. Works OK in Sql*Plus! So I have a open SR with Oracle.
I wrote a compound trigger with below code but I still has these errors during updating
This my Compound trigger Code on Price table
CREATE OR REPLACE TRIGGER TR_CHECKDATE
FOR INSERT OR UPDATE ON price
Before Each Row Is
SELECT count(*)into Cnt
(Price.ProductId = :new.ProductId)
Read the big red text. If you want help with something post it in the forum.
hash said...the :new is not working in Oracle 11g
Can anyone help? Please!
:new is only relevant for row level triggers during INSERT and UPDATE operations. It id not available from DELETE triggers and it is not available at all from statement level triggers.
I'm guessing you are using it in the wrong type of trigger. Any further questions, please ask in the forum.
André said...Hi Tim.
Thanks to this article. You help me so much.
DO NOT ask technical questions here! They will be deleted!
These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!