SOUNDEX
Encodes a string value into a four-character string.
SOUNDEX works for characters in the English alphabet (A-Z). It uses the first character of the input string as the first character in the return value and encodes the remaining three unique consonants as numbers.
SOUNDEX encodes characters according to the following list of rules:
Syntax
SOUNDEX( string )
The following table describes the argument for this command:
Argument | Required/ Optional | Description |
---|
string | Required | Character string. Passes the string value you want to encode. You can enter any valid transformation expression. |
Return Value
String.
NULL if one of the following conditions is true:
- •If value passed to the function is NULL.
- •No character in string is a letter of the English alphabet.
- •string is empty.
Example
The following expression encodes the values in the EMPLOYEE_NAME port:
SOUNDEX( EMPLOYEE_NAME )
EMPLOYEE_NAME | RETURN VALUE |
---|
John | J500 |
William | W450 |
jane | J500 |
joh12n | J500 |
1abc | A120 |
NULL | NULL |