Variable Defined In A Procedure Seems To Keep Its Value After Transaction Ends

(Doc ID 952797.1)

Last updated on SEPTEMBER 13, 2011

Applies to:

PL/SQL - Version: 10.2.0.4 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

From within a PL/SQL package a procedure updates a column dependent on two other columns (date format). If one column is greater than the other it will update another column in the table with NULL, if the other is greater it will update that column with 1. This works until you update one of the columns (and commit) in a second session, then 1 seems to be set forever. A third session can update the value to null just fine.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms