Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 24 Jan 2005 @ 15:13:02 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Questions about Packages & Stored Procedures
From:   Dempsey, Mike

See responses below...

-----Original Message-----
From: cavenham

  I'm new to TeraData, and to this forum, so apologies if I am repeating earlier questions (perhaps you could point me to the appropriate thread?).  

  Does TeraData support Packages of related stored procedures? If so, does it also allow for package level constants and variables?  


  Is it possible to declare global (or session) level variables, or should I be thinking about storing values in a table and using SQL to retrieve the values at run time?  

You can declare variables within a Stored Procedure but Teradata has no concept of a session level variables. (Except for system defined variables like USER, DATABASE, SESSION, etc.)

  Can procedures be overloaded? If not, is there the concept of optional parameters; should I just supply null arguments instead?  

Not Procedures, but Functions (UDFs) can be overloaded. Use null arguments with procedures.

  Is there a way to group SQL statements so that they can be executed within a transaction that can be rolled back or committed depending on success/failure of each of the statements?  

Yes. It is called a Macro. (Ref. 'Create Macro')

Alternativly you can use BT;/ET; statements around the set of statements that you wish to treat as a transaction. (This assumes you are running in Teradata mode as opposed to ANSI mode.)

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