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 -> Understanding EXECUTE IMMEDIATE

Understanding EXECUTE IMMEDIATE

From: <pbewig_at_swbell.net>
Date: 26 Sep 2005 12:32:08 -0700
Message-ID: <1127763128.745924.313410@f14g2000cwb.googlegroups.com>


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 Received on Mon Sep 26 2005 - 14:32:08 CDT

Original text of this message

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