Re: Trigger Conversion from SQL To ORACLE

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Fri, 09 Mar 2001 01:42:44 GMT
Message-ID: <oyWp6.529227$U46.15895090_at_news1.sttls1.wa.home.com>


In the documentation about triggers it talks about :new.columnName and :old.columnName. These are similar to the inserted temp table concept. (actually I like them better.)
Jim

--
Our new email address is kennedy-family_at_home.com
.
"Jacques Victor" <jacquesv_at_digicore.co.za> wrote in message
news: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 Fri Mar 09 2001 - 02:42:44 CET

Original text of this message