Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 05 Oct 2015 @ 14:38:37 GMT


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


Subj:   Re: STUFF Function equivalent in Teradata
 
From:   Frydryszak, Marek

REPLACE FUNCTION  sample.stuff (a varchar(8000), n1 integer, n2 integer, b
varchar(8000) ) RETURNS VARCHAR(16000)
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
COLLATION INVOKER
INLINE TYPE 1
RETURN  substr(a,1,n1-1) || b || substr(a,n1+n2);


select sample.stuff('Teradata' , 2, 3, 'data') s; Result - Tdatadata


     
  <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