From: fgreene@hayes.com
Newsgroups: comp.databases.oracle
Subject: Re: Need Help With SQL*Forms and Nextval
Message-ID: <7585.2c3add64@hayes.com>
Date: 7 Jul 93 14:27:48 EDT
References: <david.r.barstis-060793082740@no-name-medadmin.med.umich.edu>
Followup-To: comp.databases.oracle
Distribution: world
Organization: Hayes Microcomputer Products, Norcross, GA
Lines: 20


In article <david.r.barstis-060793082740@no-name-medadmin.med.umich.edu>, david.r.barstis@med.umich.edu (David R. Barstis) writes:
> Hello, I have a field in a master-block that is the primary key.  I want
> to make this unique by using a sequence.  If I set the default value to
> :sequence.seqname.nextval it works fine, except that every time I go to
> that block it generates a new sequence number, thus "wasting" sequence
> numbers.  Is there a way that I can avoid this "wasting".  I would like
> the number to be displayed to the user and to be propagated down to the
> many (five) detail-blocks correctly.
> 
> Any Suggestions?
> 
> 
> Dave Barstis
> E-mail: david.r.barstis@med.umich.edu
> 
> "I'm so broke I can't even pay attention!"


Attach an ON-NEW-FIELD-INSTANCE trigger to the field and test for a NULL
condition.  If it is not null then skip to the next field.

