Re: * HELP * - Using :NEW in a trigger

From: Bill Holmes <bill.holmes_at_gsa.gov>
Date: Tue, 21 Feb 95 18:44:33 GMT
Message-ID: <3iddef$jqb_at_limper.gsa.gov>


Morgan Skinner <morgan_at_odo.fisons-lims.com> wrote:
>I have a trigger that I would like to call a stored procedure from
>and pass the :NEW record variable to, however I don't seem to be
>able to do this. The code is as follows :-
>
>CREATE OR REPLACE
> PROCEDURE SDG_INSERT_TRIGGER_PROC (temp SDG%rowtype) AS
> id VARCHAR2(20);
> BEGIN
> -- This is a test
> id := temp.IDENTITY;
> END;
>/
>
>CREATE OR REPLACE TRIGGER SDG_INSERT_TRIGGER
> BEFORE INSERT
> ON SDG
> FOR EACH ROW
>DECLARE
>BEGIN
> -- Try to call the procedure
> sdg_insert_trigger_proc (:NEW);
>END;
>/
>
>I have tried :NEW, NEW and NEW%ROWTYPE and :NEW%ROWTYPE but all to
>no avail. Is what I want to do even possible?. Please email at the
>above address or post something here. Thanks in advance...
>
:new and :old enable your trigger to access column values, e.g.  'if :new.sal > 10000' or 'if :new.sal < :old.sal'. Received on Tue Feb 21 1995 - 19:44:33 CET

Original text of this message