Deleting and updating field after decrementing

From: Ron K <rk27_at_my-dejanews.com>
Date: Sat, 21 Jul 2001 21:52:50 GMT
Message-ID: <920daddd.0106141932.3c4ceb_at_posting.google.com>


[Quoted] I would appreciate if someone could suggest the best method to accomplish the following:

I have a table named 'ITEM' that has the following columns:

            Itemno           number(03)     ---> Key
            Description   varchar2(40)


The data is displayed using form 6i in a tabular form.

The field "Itemno" is generated using the trigger 'When new record Instance' using the code

    select nvl(max(Itemno),0) + 1 from ITEM     save;

I have 4 set of values displayed on the form as follows:

        Itemno                Description

`````````````` ```````````````````
1 circle 2 square 3 triangle 4 rectangle

If I delete the row containing "square", I want the "Itemno" of "triangle" to be 2, "Itemno" of "rectangle" to be 3 and so on as shown below.

        Itemno                Description

`````````````` ```````````````````
1 circle 2 triangle 3 rectangle

The data should be displayed as shown above upon deletion.

 Will I run into any kind of mutation problems as I am deleting and updating a table at the same time?

Thanks in advance... Received on Sat Jul 21 2001 - 23:52:50 CEST

Original text of this message