Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 29 Jun 2005 @ 16:13:04 GMT


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


Subj:   Re: Comma in string
 
From:   Dieter Noeth

Ruth Alexander wrote:

  When I add a -1 as you did, to the substring in order to back out the comma, it throws an error in Teradata.  


Victor already told you about the reason, there're som rows with no comma.

     select
        trim(substring(address_Z from 1 for position(',' in address_Z) - 1))
     from sp.tl_116870_v4
     where
        position(',' in address_Z) > 0;

Or using a case until you find the exceptional record and add another case :-)


Dieter



     
  <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