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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help with seq.nextval in Schema Manager

Re: Help with seq.nextval in Schema Manager

From: raman batra <rrbatra_at_feist.com>
Date: 1997/07/10
Message-ID: <33C56D03.3D6@feist.com>#1/1

Schema Manager is a limited for Pl/SQl programming. U may use procedure builder if u have Dev 2000.
I have found third-party tools the best (try SQL Navigator) for PL/SQL programming.

Coming back to your problem, your fix could be:

declare
v_seqval number;
v_date date;

begin

	select seq.nextval into v_seq from dual;
	select sysdate into v_date from dual;
   	:new.SEQN := v_seq;
   	:new.CONTACT_NAME := user;
   	:new.CONTACT_DATE := v_date;

exception

end;

This should do it.

Raman Batra, Oracle DBA

Bruce Hair wrote:
>
> Help for this beginner Schema Manager user is appreciated.
> I am having a problem with "seq.nextval" in a trigger for a table. The
> trigger body looks like this;
>
> BEGIN
> :new.SEQN := seq.nextval;
> :new.CONTACT_NAME := user;
> :new.CONTACT_DATE := sysdate;
> END;
>
> I am using Access linked tables and I recieve a '4098 Trigger is invalid
> and failed re-validation' error message when inserting a new row.
> Any suggestions?
> Thanks
Received on Thu Jul 10 1997 - 00:00:00 CDT

Original text of this message

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