Home » RDBMS Server » Server Administration » Re: within a trigger, trying to select values into variables based on the trigger statement
Re: within a trigger, trying to select values into variables based on the trigger statement [message #370259] Wed, 14 July 1999 16:40
scott campbell
Messages: 13
Registered: July 1999
Junior Member
Martin/Chris,

Thanks a lot for the help. It appears as though Oracle 7 wouldn't allow me to issue a conditional select against the table addressed by the trigger. To that end, I inserted the columns associated with the updated field into a temp table and then used the temp table for the select into the variables. Both of your suggestions steered me in the direction of the solution. Please see below for fragment of code.

create or replace trigger trgr_test_pass
after update of status on nsn2ktrans
for each row
when (new.status old.status)
--
declare
holder1 varchar2(20);
holder2 varchar2(20);
--
-- read columns nfile and kfile from temp table into the two
-- variables to be passed to the procedure
--
begin
--
delete from nsntemp where rownum = 1;
insert into nsntemp values (:old.nsn, :old.nfile, :old.kfile, :new.status);
select nfile, kfile into holder1, holder2 from nsntemp;
--
Previous Topic: Formatting numerical data
Next Topic: Re: To_Date Function
Goto Forum:
  


Current Time: Thu Mar 28 05:42:35 CDT 2024