Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 24 Oct 2011 @ 10:11:50 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Stored Procedures - Proc within a Proc
 
From:   sobhan.k.pratim

Hi David:

Yes you can call a stored proc from within a proc.

I am doing it for audit purposes. The code is below:

     REPLACE PROCEDURE BOOIYA.blah_blah_blah (IN Process_Id INTEGER,IN Country VARCHAR(20),IN
     Subject_Area VARCHAR(50),IN Script_Name VARCHAR(50),OUT Run_Status VARCHAR(20)) BEGIN
             /*      Variable Declaration     */
     --   
          CALL PROD_INT_SL_DE_META.Detail_Log_Entry
             ( :Process_Id
               ,:Country
               ,:Subject_Area
               ,:Script_Name
               ,:Start_Timestamp
               ,:End_TimEStamp
               ,:Check_Point
               ,:Check_Point_Desc
               ,:Records_Processed
             );


     -- DO OTHER PROCESSING

     -- AUDIT THE LOG

          CALL PROD_INT_SL_DE_META.Detail_Log_Entry
             ( :Process_Id
               ,:Country
               ,:Subject_Area
               ,:Script_Name
               ,:Start_Timestamp
               ,:End_TimEStamp
               ,:Check_Point
               ,:Check_Point_Desc
               ,:Records_Processed
             );


     END;

Regards

Sobhan



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023