Converts a normal string into a string of the SOUNDEX type.
Syntax
string soundex(string <str>)
Parameters
str: required. A value of the STRING type. This parameter specifies the string that you want to convert. This function is an additional function of MaxCompute V2.0.
Return value
A value of the STRING type is returned. If the value of str is null or special characters that can be recognized, null is returned.
Examples
Example 1: Convert the string
hello
into a string of the SOUNDEX type. Sample statement:-- The return value is H400. select soundex('hello');
Example 2: An input parameter is set to null. Sample statement:
-- The return value is null. select soundex(null);
Related functions
SOUNDEX is a string function. For more information about functions related to string searches and conversion, see String functions.