hello all,
I have a pl/sql procedure that selects the nextval from a sequence. The problem is
that it incrrements the sequence by 2 in a pl/sql procedure. If I select the nextval
from a sqlplus session, it works fine.
here is partial code that I am using.
PROCEDURE NEWTRANSACTION (v_storyid IN story.story_id%type,
v_transid OUT
story_transaction.trans_id%type ) IS
BEGIN
select story_transaction_seq.nextval into v_transid from dual;
.....
END
for debugging purposes, I made that code look like...
PROCEDURE NEWTRANSACTION (v_storyid IN story.story_id%type,
v_transid OUT
story_transaction.trans_id%type ) IS
v_value1 NUMBER; --debug code
v_value2 NUMBER; --debug code
BEGIN
select story_transaction_seq.currval into v_value1 from dual; --debug code
select story_transaction_seq.nextval into v_transid from dual;
select story_transaction_seq.currval into v_value2 from dual; --debug code
.....
END
when I ran this, v_value1 had a 200, v_transid had a 201, and v_value2 had a 202
taking the debug code out and hitting that procedure with a web page will increment
the v_transid by 2 each refresh of the page.
am i doing something wrong? I can't find any information on the web related to this
issue.
TIA
Danny Hughes
DBA
Knobias.com
601-978-3399 x103
[EMAIL PROTECTED]
www.knobias.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Danny Hughes
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).