Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 17 Jan 2013 @ 22:28:38 GMT


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


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

<-- Anonymously Posted: Thursday, January 17, 2013 17:01 -->

Hi All,

I have this below stored procedure created in Teradata.

     replace Procedure sp
     (
     empid int,
     deptname varchar(30)
     )
     begin
     update employee set deptname=:deptname where empid in (:empid); end;

When I execute it using .... CALL sp('1,2,3','abc').....It runs fine but table is not getting updated. I think values in IN clause needs to be passed dynamically

Any help with syntax ?would be much appreciated


Thanks!!!



     
  <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