Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Trigger Newbie
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
Received on Fri Oct 06 2000 - 22:12:31 CDT