Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 11 Jul 2004 @ 12:38:09 GMT


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


Subj:   Re: Cleaning Database Columns
 
From:   Christian Schiefer

Hi,

1.) I think the best solution will be a UDF under V2R5.1.

2.) With pure SQL you will get a huge sql-statment with concatenations, index, and substr.

3.) You can write stored procedure like ( pseudo-code ):

     a.) get the information into a cursor

     b.) myvar = ''

     c.) while i < character_length (  ) do
               case when substr( , i, 1 ) between '0' and '9'
                  then myvar = myvar || substr( , i, 1 )
             end
             i = i + 1;
         end /* while */

     d.) update  with myvar.

Christian



     
  <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