5164: BEGIN
5165:
5166: /*
5167: * Select the payment reference information from
5168: * the IBY_PAYMENT_REFERENCES table.
5169: */
5170: SELECT
5171: NVL(last_used_ref_number, -1)
5172: INTO
5171: NVL(last_used_ref_number, -1)
5172: INTO
5173: l_last_used_ref_num
5174: FROM
5175: IBY_PAYMENT_REFERENCES
5176: FOR UPDATE
5177: ;
5178:
5179: IF (l_last_used_ref_num = -1) THEN
5202: * concurrent instances, now get the updated last
5203: * used ref number.
5204: */
5205: UPDATE
5206: IBY_PAYMENT_REFERENCES
5207: SET
5208: last_used_ref_number = l_anticipated_last_ref_num
5209: ;
5210: