Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 23 Nov 2002 @ 18:39:41 GMT


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


Subj:   Re: Syntax error in Stored Procedure
 
From:   Syed Arifuddin

Hi,

I am using the following code which is again giving me the run time problem.

replace procedure arif.listtables()
begin
declare rowcount int;
declare tablenames varchar(100);
for row_cursor as row_cursor1 cursor for
select TableName from dbc.tables where TableKind='T' and
databasename='arifdb' and tablename='dept'
DO
   set tablenames = row_cursor.Tablename;
   CALL DBC.SysExecSQL('insert into arifdb.tableinfo SELECT '''||
 :row_cursor.Tablename||''', COUNT(*) from '||:row_cursor.Tablename);

END FOR;
end;

5568:listtables: 5568 SQL statement is not supported within a stored procedure.

Can you please suggest something.

Thanks.

Syed.



     
  <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