Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert sequence id number

Status
Not open for further replies.

kizziebutler

Programmer
Apr 28, 2005
81
GB
Hello,

I am trying to insert sequence_id when a new record is created, but not sure the best way to tackle this.

i.e., create squence seq_passenger_id
increment by 1
start with 1
order;

I have try to create ON BUTTON PRESS "WHEN CREATE RECORD"
select seq_passenger_id.nextval
into :passenger.pid
from dual;

but it complains that dual needs to be declared, any help please.
 
The best way is thorugh a PRE-INSERT trigger.

Why is dual not declared? Either you are not logged on when you compile the PL/SQL or something is fundamentally wrong with your database. Seek the assistance of your DBA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top