Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Nextval, Triggers and Inserts
I have written a function to retrieve the next value (BidNo) from a
sequence.
This BidNo should also reside in a table (Table1) which has only one field,
the BidNo (which is a sequence).
I pass the value back to an Access database and use it as part of a record
in another table (Table2).
When I go to insert the new record into Table2 it fails since the sequence
value is not in Table1 as I suppose I have just selected it, not inserted
it.
My function uses this statement : SELECT seq_tblBidGenerator.nextval INTO BidNo FROM dual;
How do I retrieve the next value in a sequence AND insert it into a table with one field (which should trigger the next sequence) all at the same time, ensuring that the value retrieved from nextval is equal to the value inserted into Table1?
Probably simple.....
April McClellan
-- Posted from thor.hydroone.com [192.75.116.12] via Mailgate.ORG Server - http://www.Mailgate.ORGReceived on Fri Mar 02 2001 - 13:29:54 CST
![]() |
![]() |