Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 30 Mar 2005 @ 13:55:41 GMT


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


Subj:   Re: Handling common SQL blocks in a Stored Proc
 
From:   Geoffrey Rommel

  (In each case, the stored proc is one SQL call that uses derived tables at several spots.)  


If the procedure is really just one SQL statement, it could be coded as a macro. Broadly speaking, I would prefer views to macros and macros to stored procedures.


  We would like to simplify the maintenance and add some structure to the SQL. One suggestion is to capture the calls against the derived tables in views which would then be invoked by the stored proc.  


Sounds good. Anything that makes the SQL easier to read is a good idea.



     
  <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