Home » Developer & Programmer » Forms » Oracle Form Question
Oracle Form Question [message #80579] Wed, 16 October 2002 16:30 Go to next message
Syed Ali
Messages: 1
Registered: October 2002
Junior Member
Q. I am trying to generate a number in multi record block.
I am not using Sequence. How can i Generate # and maitain for delete record and add record for this Number.
Please Hlep Me

Syed Ali
Re: Oracle Form Question [message #80587 is a reply to message #80579] Thu, 17 October 2002 10:47 Go to previous message
Messages: 98
Registered: February 2002
On the pre-insert trigger for your block, write the code to get your number. If you decide to create a sequince number in oracle, (create sequence my_seq), then you'd select my_seq.nextval into :block.id from dual. Or you could select max(my_id) + 1 into :block.id from my_table. Or, you could create a table with your number in it and increment it as you issue the numbers.
Just assign the number however you decide to create it in the pre-insert trigger. You don't have to do anything special on delete.
Previous Topic: Give table name dynamically
Next Topic: ora-06502
Goto Forum:

Current Time: Tue Oct 19 20:32:12 CDT 2021