weird problem calling a fuction

  • From: "Michael McMullen" <ganstadba@xxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 1 Feb 2005 11:03:25 -0500

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;
/
bash-2.03$ sqlplus

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^')
----------------------------------------------------------------------------
----
^MIKE^

SQL> select query.mike_test('^MIKE^') from dual;
select query.mike_test('^MIKE^') from dual
       *
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-302: component 'MIKE_TEST' must be declared
--
//www.freelists.org/webpage/oracle-l

Other related posts: