Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 14 Sep 2004 @ 18:26:21 GMT


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


Subj:   Re: UDF's without using C
 
From:   paul.burns

You wrote:

  "anybody got a decent example of using straight sql to return the reverse of a variable-length string ?"  



Okay this may or may not be a "decent example" but it could be a start depending on the length of the string.

     select name
     , Trim(substr(name,char(name),1) || substr(name,char(name)-1,1)  ||
     substr(name,char(name)-2,1 ) || substr(name,char(name)-3,1 ) ||
     substr(name,char(name)-4,1 ) ) eman
     from
     ( select 'paul '(varchar(5)) name ) dt ;

Paul



     
  <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