Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 13 Jul 2005 @ 16:48:39 GMT


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


Subj:   Re: Need to remove blank spaces from data
 
From:   bppb266

Hi

Put this on a procedure controlling remaining spaces or execute it repeatly until remove ( or replace ) all spaces

     /**  remove first space character in a field  **/
     UPDATE
         a_table
     SET
         name_field =
         CASE WHEN
             index(name_field,' ') > 0
         THEN
             substring(name_field,1,index(name_field,' ')-1)     ||   /* '_'  ||  */
             substring(name_field,index(name_field,' ')+1,length(name_field))
         ELSE
             name_field
         END

Regards,

B.



     
  <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