Re: DEV2000 - Oracle Form 4.5 - Detail records, add 1 to seq_no field

From: George Dimopoulos <gdimopou_at_kamloops.env.gov.bc.ca>
Date: 1997/09/17
Message-ID: <1997Sep17.095046.9496_at_vmsmail.gov.bc.ca>#1/1


In article <1997Sep15.164829.9490_at_vmsmail.gov.bc.ca>, gdimopou_at_kamloops.env.gov.bc.ca says...
>
>I have a master-detail app,
>
>master table has loc_key as unique primary key
>detail table has loc_key+seq_no as unique primary key
>
>My app allows user to enter 1 master record and many detail records.
>At the detail record, I would like to manage the generation of
>unique values for seq_no for a given master record identified by loc_key.
>
>Without saving each detail record, and then find the next seq_no
>value, how would I increase the value of seq_no?
>
>Seq_no for current record would be max seq_no value for all records
>on the current form + 1
>
>note: not all detail records have been saved to the database
>
>Any ideas would be greatly appreciated
>
>thanks in advance
>
>George D
>
>if you don't mind, could the answers be sent to my
>email account directly gdimopou_at_kamloops.env.gov.bc.ca
>
>I will post answers after I recieve them
>

Regarding your posting below, I hope I'm interpreting your problem correctly.... you can do the following:
SELECT sequence_name.nextval INTO :block.seq_no FROM dual;

The dual table controls generation of the sequence value. Check the manuals for 'nextval' as I may have the syntax wrong.

Good Luck
Tracey Berukoff Received on Wed Sep 17 1997 - 00:00:00 CEST

Original text of this message