Re: Functions

From: Bobby Z. <>
Date: Wed, 25 Feb 2009 12:39:34 -0800 (PST)
Message-ID: <>

On Feb 23, 8:02 pm, Robert Klemme <> wrote:
> Right, the local variable is visible - the function is not.  The
> difference is there only for direct usage of both - when using EXECUTE
> IMMEDIATE you're lost in both cases.

Not really: you can still reference your PL/SQL variables with EXECUTE IMMEDIATE - but you need to explicitly bind them yourself (which PL/ SQL does for you automatically with native SQL):

  v sys.dual.dummy%type;
  x sys.dual.dummy%type := 'X';
  execute immediate 'select dummy from sys.dual where dummy=:x'

     INTO v
    USING x;


   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm) Received on Wed Feb 25 2009 - 14:39:34 CST

Original text of this message