Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 24 Sep 2003 @ 17:36:47 GMT


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


Subj:   Re: Soundex() and Latin Letters
 
From:   Patrick Mohan

Hi John,

Not sure if you are still having issues but I ran into the same one the other day. This is an update statement I used on V2R5...the 'non- latin' characters the statement rejected were spaces and hyphens in the name, apostrophes had already been cleansed. Essentially this seeks out spaces and hypens and concatenates the strings on either side; the same operation is being performed on the names that will be matched. Hope this helps.

UPDATE xxx.XXXXXXX
SET SNDEX_LNAME =
CASE
        WHEN CUSTLASTNAME IS NULL
                THEN NULL
        WHEN CUSTLASTNAME LIKE '%-%'
                THEN SOUNDEX(
                                (SUBSTRING(CUSTLASTNAME FROM 1 FOR
POSITION('-' IN CUSTLASTNAME)-1 )                               ||
                                SUBSTRING(CUSTLASTNAME FROM POSITION('-'
IN
CUSTLASTNAME)+1  )
                                )
                                )
        WHEN POSITION ( ' ' IN CUSTLASTNAME) > 0
                THEN SOUNDEX(
                                (SUBSTRING(CUSTLASTNAME FROM 1 FOR
POSITION(' ' IN CUSTLASTNAME)-1 )                               ||
SUBSTRING(CUSTLASTNAME FROM POSITION(' ' IN CUSTLASTNAME)+1  ) )
)
ELSE SOUNDEX(CUSTLASTNAME) END;


     
  <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