Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Thu, 14 Apr 2016 @ 10:22:48 GMT


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


Subj:   Re: Name matching issue
 
From:   David Clough

Bob Diehl suggested

  Try using something like soundex  


That 'sounded' like a great idea, until I then discovered that Soundex only works on Latin characters, for example (straight from the manual) this doesn't work :

SELECT SOUNDEX('?b?'); The characters ? and ? are not simple Latin characters.

Pity, really thought we were onto something here.

Just had a thought ..... what if I strip all the accented characters out and replace them with the English equivalent .... hmm .... something like this :

     SELECT lower('?my????name') as MyMadeupName ,case when REGEXP_INSTR(MyMadeupName,
     '?|?|?|?|?') > 0
        then
     REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(MyMadeupName,'
     ?','z'),'?','c'),'?','u'),'?','e'),'?','s')
     else MyMadeupName
      end as myLatinMadeupName
     ,case when myLatinMadeupName = 'Smyzcuename'
       then 'Matched'
       else 'Failed to Match' end
       as Match_Result
       ;

gives :

     ?my????name        smyzcuename        Matched

Ha !

I suppose I could always wrap the RegExp concatenated Functions into an SQL Function, that would make it look a bit prettier.


Regards

David Clough
Data Architect (Database Design Specialist) Data Architecture



     
  <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: 24 Jul 2020