|
|
Archives of the TeradataForum
Message Posted: Sat, 14 Oct 2006 @ 17:36:27 GMT
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.
| |