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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Understanding EXECUTE IMMEDIATE

Re: Understanding EXECUTE IMMEDIATE

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: Tue, 27 Sep 2005 11:39:06 +0100
Message-ID: <a5PSIyjKFSODFwGD@jimsmith.demon.co.uk>


In message <1127763128.745924.313410_at_f14g2000cwb.googlegroups.com>, "pbewig_at_swbell.net" <pbewig_at_gmail.com> writes
>I am having trouble understanding the scope rules of
>EXECUTE IMMEDIATE. Consider this example, which causes
>a PLS-201 error "identifier 'SAY_HELLO' must be declared":
>
> declare
> procedure say_hello is
> begin
> dbms_output.put_line('hello');
> end;
> begin
> execute immediate 'begin say_hello; end;';
> end;
>
>How can I work around this problem? How can I write
>a procedure that takes an argument? How can I write
>a package including a procedure that calls back to a
>procedure in my client code?
>
>Phil
>

Other people have pointed out why this is a bad idea, but I'm not even sure it is possible.

Where is the client code? A stored program knows nothing of your client code, it can only execute in the context of the database server.

-- 
Jim Smith
Because of their persistent net abuse, I ignore mail from
these domains (among others) .yahoo.com .hotmail.com .kr .cn .tw
For an explanation see <http://www.jimsmith.demon.co.uk/spam>
Received on Tue Sep 27 2005 - 05:39:06 CDT

Original text of this message

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