Example

Teradata Vantage™ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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.