Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 15 Apr 2010 @ 09:13:16 GMT


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


Subj:   Calling a Procedure with Dynamic SQL
 
From:   Selim GUBUK

Hi everyone,

I want to call a stored procedure within another procedure with dynamic SQL and I wrote a simple SPL named SPL_CALLER. But it does not work.

     REPLACE PROCEDURE SPL_CALLER(SPL_NAME VARCHAR(30)) BEGIN
       CALL DBC.SysExecSQL('CALL ' || :SPL_NAME || '()'); END;

In the reference document, it says:

The following SQL statements cannot be specified as dynamic SQL in stored procedures:

     CALL, DATABASE, HELP, SELECT

What kind of an approach should I follow?


Regards,

Selim Cubuk



     
  <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: 27 Dec 2016