Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 19 Jul 2007 @ 15:20:06 GMT


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


Subj:   Enhancements or Improvements to Stored Procedures
 
From:   David Clough

Does anyone know of any useful enhancements or application improvements to Stored Procedures, in recent releases of Teradata ?

One thing I do find difficult is stepping through a SP, particularly when it's not doing what you expect it to do. I end up writing data to Testing Table at strategic points in the SP but it's all rather time-consuming.

Is there anyway of defining functions, for example, which returns a value, or is this effectively just another SP which is invoked from within the main SP ?

In simple terms what does ITERATE do with LOOP. It does explain it in the manual, but still the penny is dropping in my head.

Just so I'm not taking all the time and not giving to the Forum, here's a little technique I use from time to time: -

In situations where it's particularly difficult to imbed Input parms into a built up piece of dynamic SQL - you know, a blizzard of triple quotes and Concatenation marks (if you've been there, you'll know what I mean) - I write the Parms into a Global Temporary table and then just Join that GTT into the main query. It really simplifies the code. In fact, someone asked me today how to get over a similar problem they were having and I described this very technique.

Also, I take it that there's no easy way of returning a result set of values, like an array or, even better, an object ?

Any 'nougats' of wisdom I'm sure would be most appreciated, and not just by me, I'm sure.

Dave Clough
Database Designer
Express ICS

www.tnt.com



     
  <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