Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 08 Apr 2005 @ 20:32:55 GMT


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


Subj:   Re: Extracting piece of data from a string of text
 
From:   ulrich arndt

Julie,

     substring(test from position('ac-' in test)+3)

give you everything after the first occurance of ac-

     position(',' in substring(test from position('ac-' in test)+3))

give you the position of the first ',' after ac-
-1 will be the length of the string you are looking for

     substring(substring(test from position('ac-' in test)+3)
         from 1 for position(',' in substring(test
         from position('ac-' in test)+3))-1)

should than be the code which give you what you are looking for, as long as you only search the first occurance in a string. In case of recursive searches check the ETL process if possible.


Ulrich



     
  <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