Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Tue, 19 Aug 2003 @ 09:01:23 GMT





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




Subj:   Help with TRIM and SUBSTR
 
From:   Anomy Anom



<-- Anonymously Posted: Tuesday, August 19, 2003 04:09 -->

sel * from test;

$MOBM$UIFPRIVATE&D&H
$MOBM$UIFCUSTKNOWBRC&D&H
$MOBM$UIFBUSINESSTK&D&H

I want to get only the characters starting from position 8 onwards till the position '&D&H'

i.e. I want entries as

IFPRIVATE&D&H
IFCUSTKNOWBRC&D&H
IFBUSINESSTK&D&H

I can use the substring function with the TRIM TRAILING command but TRIM only trims 1 character, which is a limitation.

I then used the INDEX to get the position, but this command fails. Any suggestions.

sel substring (a FROM 8 FOR INDEX (a, '&D')) from test

Thanks





     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008