Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Tue, 02 May 2012 @ 01:20:49 GMT


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


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

I have not tested my previous suggestion but the following does return the position of the last '/':

     select instr('home/level1/level2/myfile', '/', -1);

returns 19.

Specifying a negative value for the start position (param 3) causes it to work backwards. This may only apply to the version in Teradata 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