Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: all_ind_columns in stored procedure
"Andrei Romazanov" wrote...
> 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;
>
>
> 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
>
Hi Andrei,
maybe 'AUTHID current user' would help?
Greetings,
Guido
Received on Wed Dec 03 2003 - 05:36:56 CST