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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL problem

Re: PL/SQL problem

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/02/27
Message-ID: <34f71a3a.2862355@192.86.155.100>#1/1

A copy of this was sent to Chris Remshaw <griffen_at_jhu.edu> (if that email address didn't require changing) On Thu, 26 Feb 1998 10:40:22 -0500, you wrote:

>I'm trying to run a PL/SQL program and I'm getting this error:
>
>LINE/COL ERROR
>--------
>-----------------------------------------------------------------
>48/4 PL/SQL: SQL Statement ignored
>49/9 PLS-00201: identifier 'SYS.OSP$TEMPLATE_COMMENTS' must be
> declared
>
>
>HOWEVER, that is a table! And if I comment that part out the PL/SQL
>works FINE. (other tables are called like this and they work absolutely
>fine)
>

roles are never enabled during the execution/compilation of a procedure.

Try this:

SQL> set role none;
SQL> desc sys.osp$template_comments

If you can do it in plus with no roles you can do it in a procedure. If you can't, you must have the privelege from a role and hence won't be able to do it in a procedure.

You probably have access to that table from a role. Grant the privelege directly to the owner of the procedure and it'll work.

>cursor docs_cursor (in_code NUMBER) IS
> select referenced_document_code
> from osp$template_document_terms
> where template_code = in_code;
>
> cursor comments_cursor (in_code NUMBER) IS
> select comment_code
> from osp$template_comments
> where template_code = in_code;
>
>...the top one will compile but the bottom one gives errors... both are
>simply tables... why is it doing this? anyone?
>
>Thanks in advance,
>Chris
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Feb 27 1998 - 00:00:00 CST

Original text of this message

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