Re: Oracle 9i forms sequence + pre-insert form trigger

From: A.barth <member38281_at_dbforums.com>
Date: Fri, 05 Sep 2003 09:42:02 -0400
Message-ID: <3334658.1062769322_at_dbforums.com>


Hi,

I think the use of a bind variable is not the right choice.

Replacing that by a normal variable (declared before the BEGIN) should fix your problem.

For example:

CREATE SEQUENCE count_seq

INCREMENT BY 1 START WITH 1 MAXVALUE 999999 NOCYCLE; create or replace TRIGGER "USER".mytrigger1

AFTER INSERT ON mytable1

FOR EACH ROW  declare

  l_id NUMBER;

 BEGIN   SELECT count_seq.nextval INTO l_id FROM dual;

  INSERT INTO mytable2 values (l_id);

END; /

--
Posted via http://dbforums.com
Received on Fri Sep 05 2003 - 15:42:02 CEST

Original text of this message