Sequence Generation [message #346844] |
Tue, 09 September 2008 18:59 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
former
Messages: 15 Registered: June 2008
|
Junior Member |
|
|
Hi,
I have a created a form which is is based on a database of books. Here, the user gets to add books while running the form (dynamically). However, I would like the serial no of each record to get updated i.e. whenever a new record (book details) is inserted, the sr_no should be automatically generated in the database.
Can you pls guide.
thank you
|
|
|
Re: Sequence Generation [message #346848 is a reply to message #346844] |
Tue, 09 September 2008 20:11 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
former
Messages: 15 Registered: June 2008
|
Junior Member |
|
|
I have given a Pre-Insert Trigger at block level as follows:
select bookno_seq.nextval into :books.sr_no from dual;
However, I am getting these errors
"Error 201...........identifier 'dual' must be declared"
"Error 0..............SQL statement ignored"
Any guidance on this
thank you
|
|
|
|