Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Tue, 01 May 2012 @ 16:45:02 GMT


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


Subj:   Re: Extracting a String From End
 
From:   Dempsey, Mike

If you are using a Teradata release that supports the REGEXP_INSTR() function you can use the following:

     REGEXP_INSTR(yourString, '/[^/]+$')

to return the character position of the last '/' that is followed by other characters.

You can then use this value in a SUBSTRING() function.

I don't remember which release added that function - I think it was 13.10 or 14.0.


Mike Dempsey
Teradata Client Tools



     
  <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: 28 Jun 2020