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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Trigger Newbie

Re: Trigger Newbie

From: Michael Bialik <michael_bialik_at_my-deja.com>
Date: Sun, 08 Oct 2000 12:52:50 GMT
Message-ID: <8rpqn2$ukb$1@nnrp1.deja.com>

Hi.

 I tried to reproduce your problem, but it worked OK ( Oracle 8i/NT ).  Try to remove all statements from LOOP and see what happens:

 FOR v_assignment IN (SELECT move_id, packer_id FROM move WHERE

       move_date > = :new.move_date) LOOP    NULL;
 END LOOP;  May be the error shown is incorrect.

 HTH. Michael.

In article <EFvD5.21181$O7.310579_at_ozemail.com.au>,   "Susan Entwisle" <sentwisle_at_ozemail.com.au> wrote:
> Hi All,
>
> The following trigger does not compile I receive error 4/79 PLS-
 00049:
> bad bind variable 'NEW.MOVE_DATE' when I use sho errors. I think it
 is
> because the :new is late binding.
>
> CREATE OR REPLACE TRIGGER RLimitMoveDate
> BEFORE INSERT OR UPDATE OF move_id ON assignment
> FOR EACH ROW
> BEGIN
> /* Record the new data in PackerData - this avoids making changes
 to the
> mutating assignment table
> which would cause the ORA-4091 error.*/
> FOR v_assignment IN (SELECT move_id, packer_id FROM move WHERE
 move_date
> = :new.move_date) LOOP
> PackerData.v_TableIndex := PackerData.v_TableIndex + 1;
> PackerData.v_PackerID(PackerData.v_TableIndex) :=
 v_assignment.packer_id;
> PackerData.v_MoveID(PackerData.v_TableIndex) :=
 v_assignment.move_id;
> END LOOP;
> END RLimitMoves;
>
> Any help would be appreciated.
>
> Thank you
>
> Cheers
> Susan
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sun Oct 08 2000 - 07:52:50 CDT

Original text of this message

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