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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Question

Re: PL/SQL Question

From: Jeremy <newspostings_at_hazelweb.co.uk>
Date: Thu, 6 Nov 2003 11:12:59 -0000
Message-ID: <MPG.1a143d07b1231276989927@news.individual.net>


In article <bod9ji$ga8$1_at_panco.nettuno.it>, cris119_at_operamail.com says...
> Jeremy wrote:
>
> > I seem to recall a feature where you could have an in-line procedure
> > declared (i.e. sort of within the procedural code of another procedure).
> > Tell me, am I imagining things?
>
> Are you talking about something like that?
>
> begin
> execute immediate 'begin dbms_output.put_line(''hello''); end; ' ;
> end ;
> /
>
> If you are talking about that, yes, it can be done :)
>

No I wasn't but sorry for not being clear!

Sort of along the lines of :

create or replace procedure proc as
  l_variable number;
begin
  --
  sub_proc;
  --
  procedure sub_proc is
    l_variable :=1;
  end subproc;
end proc;
/

I am pretty familiar with package headers and bodies and understand about decalring procedures etc - in the example above subproc would be able to reference the variables defined in proc so there would be no paramater passing between the two. I recognise this can be done by defining the variables as package variables but am just trying to see if I have made a false assumption in my distant past!

cheers

-- 

jeremy
Received on Thu Nov 06 2003 - 05:12:59 CST

Original text of this message

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