Reputation: 65
We just migrated from Oracle 8i to Oracle 11g. In doing so we ran into a problem we have a variable called current_time. we use it as both a variable in various procedures and functions ans as well as column names in several tables. The references to the term 'CURRENT_DATE) looks to be in the neighborhood of a few thousand in our procview. When we upgraded, suddenly any time we were referring to the term current_date the new function was overriding the variables and column names. My question is how can we disable the reference to the oracle defined function?
Upvotes: 2
Views: 124
Reputation: 231711
You need to qualify the column name. Otherwise, Oracle's scope resolution rules will choose the function over the column
SQL> create table foo( current_date date );
Table created.
SQL> insert into foo values( date '2011-01-01' );
1 row created.
SQL> select current_date from foo;
CURRENT_D
---------
07-FEB-12
SQL> select f.current_date from foo f;
CURRENT_D
---------
01-JAN-11
Upvotes: 1