Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 23 Nov 2002 @ 04:58:26 GMT


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


Subj:   Re: Syntax error in Stored Procedure
 
From:   Fred W Pluebell

You can never use a host variable that way in SQL, and you can't use the ":" to reference a local variable. But "dynamic SQL" allows you to build SQL statement text at run time. For example, use an INSERT/SELECT statement such as this:

CALL DBC.SysExecSQL('insert into arifdb.tableinfo SELECT '''||
 :row_cursor.Tablename||''', COUNT(*) from '||:row_cursor.Tablename);


     
  <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