Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 10 Apr 2014 @ 15:28:09 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: ARRAY reference in a Stored Procedure
From:   David Clough

After the hint on using Array_Get (which I'd considered but didn't quite see the connection at the time), I now have :

     SET sL_EmailAddress = UPPER(TRIM(ARRAY_GET(aG_AccntMgrEmailAddr,nL_LoopCt)));

working, where aG_AccntMgrEmailAddr is an Array of 20 elements.

If I say it myself the resultant code is very elegant and flexible.

So, thank you.

For those of you who use Stored Procedures, you might want to consider using Arrays, as they open up a lot of new opportunities. For example, you can dynamically aggregate Child Table row entries into an Array on the Parent, and compare that with another Array using ARRAY_COMPARE, perhaps on a different Table .... just an example.

My tentative foray into using them (although I have used them in Oracle in the past) is proving to be quite fruitful (not to mention very interesting).


David Clough
Senior BI Database Designer
BI Competency Centre

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