Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> all_ind_columns in stored procedure

all_ind_columns in stored procedure

From: Andrei Romazanov <ierdna_at_web.de>
Date: Wed, 3 Dec 2003 10:12:40 +0100
Message-ID: <bqk9fv$23e6lo$1@ID-70985.news.uni-berlin.de>


Hi all,

I use in a function, that index-fields of a table determines, the following cursor:
...
...

   DECLARE

      CURSOR indfields
      IS
         SELECT    TABLE_NAME, SUBSTR (column_name, 1, 20) COLUMN_NAME
             FROM all_ind_columns
            WHERE index_name = vsobj and  index_owner=USER
         ORDER BY column_position;

   BEGIN
      ....
     .....

      OPEN indfields;
      LOOP
         FETCH indfields
          INTO sTable, sfields;

         EXIT WHEN indfields%NOTFOUND;


if I use instead of all_ind_columns user_ind_columns - everything is ok. Now I would like to create the function in one user and to make it for different user available with public synonym. Therefore I am changed on all_ind_columns.

Now the function runs only in the user correctly where it was created.  In any other user I get immediately indfields%NOTFOUND.  Does someone have an idea?

Thanks in advance
Andrei Received on Wed Dec 03 2003 - 03:12:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US