Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing parameter(data) to trigger

Re: Passing parameter(data) to trigger

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 21 Feb 2000 11:52:39 -0500
Message-ID: <r8r2bsoslfupke6h37lhp4ossbvb3a6460@4ax.com>


A copy of this was sent to jeanch_at_my-deja.com (if that email address didn't require changing) On Mon, 21 Feb 2000 16:10:36 GMT, you wrote:

>folks,
>
>I don't know if this is doable; I am looking for a way
>of passing data to a trigger so the trigger could use it in its logic;
>
>...
>foo(x in integer)
>
>begin
>...
>insert into tab values(y,z);
>/* in a trigger fired off at insert into tab
>we want to use x value to do some processing */
>end;
>

create or replace package My_Pkg
as

        x number;
end;

create procedure foo( x in integer )
as
begin

   my_pkg.x := 55;
   insert into tab values ( y, z );
   ...
end;
/

And in the trigger, just reference my_pkg.x.

>
>Any thoughts on this
>Cheers
>JC
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Feb 21 2000 - 10:52:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US