Trigger Conversion from SQL To ORACLE

From: Jacques Victor <jacquesv_at_digicore.co.za>
Date: Wed, 7 Mar 2001 15:11:50 +0200
Message-ID: <3aa633ba.0_at_news1.mweb.co.za>


Hi All.

1.) I want to create a trigger on the Mobdat table for any updates to CellNumber and ID. The Updates must then be written to MobDatUpdates table. I have created the Script in SQL but need to convert it to ORACLE.

2.) What is the equivalent of the SQL system INSERTED temp table for ORACLE..reffer to script below.

Thanks for the help



SQL Script

CREATE TRIGGER [TRIGGERUP] ON [MOBDAT] FOR MOBDATUPDATES AS
IF

         ins.CellNumber <> Mobdat.CellNumber OR

         ins.ID <> Mobdat.ID

BEGIN

     INSERT INTO MOBDATUPDATES(NodeNumber,ID,CellNumber,Status,DateChanged)
     SELECT         ins.NodeNumber,
                            ins.ID,
                            ins.CellNumber,
                            0,
                            SYSDATE()
     FROM INSERTED ins

END; Received on Wed Mar 07 2001 - 14:11:50 CET

Original text of this message