Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 14 Oct 2006 @ 17:36:27 GMT


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


Subj:   Re: Stored procedure question
 
From:   Geoffrey Rommel

  But I do not want to use output parameter and would like to display appropriate message and make SP execution fail in case of errors. In case of successful execution, it should not return anything.  


  Is it possible to do that in SP?  


I think so. The following procedure returns nothing.

     replace procedure sysdba.haritha2
      ( in  mystmt  varchar(500) )
     begin
       call dbc.SysExecSQL(:mystmt);
     end;


     call haritha2('create volatile table aaa (bbb integer)');
      *** Procedure has been executed.
      *** Total elapsed time was 1 second.

     call haritha2('bad statement');
     $
      *** Failure 3706 haritha2:Syntax error: expected something between the
     beinning of the request and the word 'bad'.
      *** Total elapsed time was 1 second.


     
  <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