Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> weird problem calling a fuction
9.2.0.3
Solaris
Users called me up saying their packages/procedures no longer work. Of
course, they've been working for years. I've whittled it down to a test case
below
Note I've logged in as the query user created the function and then called
it sucessfully from dual. When I reference the function which the query user
owns and I'm also logged in as then it fails.
CREATE OR REPLACE FUNCTION mike_test
( sInputString IN varchar2 ) return varchar2 IS BEGIN return replace(sInputString, '''', '^'); END mike_test;
SQL*Plus: Release 9.2.0.3.0 - Production on Tue Feb 1 11:18:51 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Enter user-name: query
Enter password:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
SQL> drop function mike_test;
Function dropped.
SQL> @mike
Function created.
SQL> select mike_test('^MIKE^') from dual;
MIKE_TEST('^MIKE^')
*
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-302: component 'MIKE_TEST' must be declared
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Feb 01 2005 - 11:07:36 CST