SOUNDEX Function Examples | Teradata Vantage - 17.10 - Example - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)

The following SELECT statement returns the result that follows.

   SELECT SOUNDEX ('ashcraft');
   
   Soundex('ashcraft')
   -------------------
   a261
The surname “ashcraft” initially evaluates to “a2h2613,” but the following Soundex rules convert the result to a261.
  • “h” is dropped because it occurs in the third position. Soundex drops all occurrences of the following characters in any position other than the first.

    A, E, I, O, U, Y, H, W

  • “2” is dropped because it represents the second occurrence of one of the following characters:

    C, G, J, K, Q, S X, Z

    If two or more characters with the same code are adjacent in the original name, or adjacent except for any intervening H or W, Soundex omits all but the code for the first occurrence of the character in the returned code.

  • “3” is dropped because Soundex drops the rightmost digits if character_string evaluates to more than three digits following the initial simple Latin character.