Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: nested procedures

    Hi,

    I have 2 procedures. ProceA & procB. ProcA is calling ProcB. Initally I have written them separately. Both are working fine. Now we had a scenario that both has to be on a single procedure.
    Can some one tel me how can i club ProcB with ProcA.

    Create or replace ProcA
    Begin
    declaration part

    ---
    ---
    --

    End@
    Create or replace ProcB
    Begin
    declaration part

    ---
    ---
    --

    End

    Is this the correct thing which I am doing or should I need to add any thing else.

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    Declared types and procedures are available since v10.1

    Code:
    --#SET TERMINATOR @
    
    set serveroutput on@
    
    begin
      declare l_ts timestamp;
      declare procedure procB(out p_ts timestamp)
      begin
        set p_ts=current timestamp;
      end;
    
      call procB(l_ts);
      call dbms_output.put_line(l_ts);
    end@
    Regards,
    Mark.

  3. #3
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    club ??
    in the latest sample : still proca and procb are created as standalone procs
    you should add only the body of procb into (somewhere) in proca
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  4. #4
    Join Date
    Jul 2014
    Posts
    294
    Thanks Guys got it

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •