Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 18 Jan 2013 @ 16:37:15 GMT


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


Subj:   Re: Handling IN clause in stored procedure
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, January 18, 2013 11:20 -->

You can use a string expression to substitute the input text into the SQL as literal values:

     SET sqlstmt = 'update employee set deptname='''||deptname||'''
     where empid in ('||empid||')';

Then either:

     CALL DBC.SysExecSQL(sqlstmt);

or

     EXECUTE IMMEDIATE sqlstmt;


     
  <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: 23 Jun 2019