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

From: Scott Urman <surman_at_oracle.com>
Date: 22 Feb 1995 19:00:59 GMT
Message-ID: <3ig1lb$a1d_at_dcsun4.us.oracle.com>


In article <3id77q$l7a_at_alterdial.UU.NET>, Morgan Skinner <morgan_at_odo.fisons-lims.com> writes:
|> 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...
|>

Unfortunately, this isn't possible. See enhancement request 213607. The :new and :old records are not really records of table%rowtype, although they should be, in my opinion. Received on Wed Feb 22 1995 - 20:00:59 CET

Original text of this message