16.20 - Example - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Advanced SQL Engine
Teradata Database
March 2019
Programming Reference

The following SELECT statement returns the result that follows.

   SELECT SOUNDEX ('ashcraft');
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.