Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with CURSORS!!!
A copy of this was sent to "Michael Rosadino" <mrosadino_at_snet.net> (if that email address didn't require changing) On Thu, 16 Apr 1998 11:47:02 -0400, you wrote:
>Given the code excerpt below, I'm getting compilation errors when I try to
>store the procedure
>in our database:
>/***************************************************************************
[snip]
>Compilation Errors:
>**********************
> PLS-00201: identifier 'REF.REVENUE_DIVISION' must be declared
> PLS-00320: the declaration of the type of this expression is incomplete or
>malformed
>
>Now here's the strange part - when I execute this PL/SQL in SQL*Plus 3.3 as
>an anonymous
>block, i.e., from the DECLARE through the first END, it executes fine and
>returns the
>desired output. So why does it not compile as a stored procedure?
>P.S. server = Oracle v.7.2.3 on an HP/UNIX 3000 platform; client = MS
>Windows 95
>
roles are never enabled during the execution of a procedure.
Try this:
SQL> set role none;
SQL> "statement you want to test to see if it'll work in a procedure"
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 a stored procedure won't be able to do it either.
You probably have the privelege to do what you are trying to do in stored procedures via a role. Grant the privelege directly to the owner of the procedure and it'll work.
>Thanks in advance,
>**********************
>Michael Rosadino,
>Gerber Technology, Inc.
>E-Mail: mrosadino_at_snet.net
>
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
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 Thu Apr 16 1998 - 00:00:00 CDT
![]() |
![]() |