|  |  | Archives of the TeradataForumMessage Posted: Wed, 29 Jun 2005 @ 16:13:04 GMT
 
 
  
| 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 
 
 |  |