Re: PL/SQL Trigger Question

From: Stefan Kursawe <skursawe_nospam_at_earthlink.net>
Date: Thu, 16 Nov 2000 03:41:41 GMT
Message-ID: <VHIQ5.1184$mf5.76352_at_newsread2.prod.itd.earthlink.net>


Well, that would be nice, but unfortunately does not work.

You could try this:
declare the following definitions in the TABLE_ACTIONS package spec TYPE tRecord IS RECORD ( col1 some_table.col1%type, .... ); TYPE myRecord IS TABLE OF tRecord;
newRecord myRecord;

Then in the trigger you declare:
newRecord TABLE_ACTIONS.myRecord;
and you assign the :new. columns

newRecord(1).col1 := :new.col1;
newRecord(1).col2 := :new.col2;
...
and finally call table_actions.valid_record( newRecord ); where valid_record is declared as
PROCEDURE valid_record( newRecord IN TABLE_ACTIONS.myRecord )

Hope this helped.
Stefan

<raptnor_at_my-deja.com> wrote in message news:8uuked$ilq$1_at_nnrp1.deja.com...
> I'm really new to PL/SQL so forgive me if this is a dumb question. Can
> you pass the new record to a PL/SQL procedure for processing? See below
> for code snippet.
>
> CREATE OR REPLACE TRIGGER table_valid
> BEFORE INSERT OR UPDATE ON some_table
> FOR EACH ROW
> DECLARE
> BEGIN
> TABLE_ACTIONS.VALID_RECORD(new);
> END;
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Received on Thu Nov 16 2000 - 04:41:41 CET

Original text of this message