Re: Getting NEXTVAL just prior to a COMMIT

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 1995/09/12
Message-ID: <433udo$it7_at_tpd.dsccc.com>#1/1


place you code in the ON-INSERT trigger

	if :field_name is null then
	  select seq_name.nextval from dual ;
	end if;

Craig Harper (caharper_at_hooked.net) wrote:
:> We are looking for suggestions on how to assign an ID number based on the
:> NEXTVAL of a sequence generator, after all the other fields of the table
:> have been filled in.
 

:> The data will be entered through forms 4.5, I know that we can control
:> the navigation, thus enabling us to enter the data for the other fields
:> befor getting the nextval, but what trigger, or combo of triggers, would
:> I use to perform this feat of magic. I can set it up so that I start with
:> a when_button_pressed trigger, but then what?
 

:> If anyone could point us in the right direction, Well thanks in advance,
:> and many blessing to you and yours.
 

:> Craig Harper

--
This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Tue Sep 12 1995 - 00:00:00 CEST

Original text of this message