dblmetaphone(R;X)

Returns the Double Metaphone hash of a given value.

Syntax

dblmetaphone(R;X)

Input

Argument Type Description
R text Determines whether to return the primary code, secondary code, or both
R must be one of the following:
  • 'first' - return the primary code
  • 'second' - return the secondary code
  • 'both' - return both the primary and secondary codes separated by an underscore (_)

If R is N/A, an error is returned.

X text A column name

Return Value

Returns a text string corresponding to the phonetic hash of X translated using the Double Metaphone algorithm.

If X is N/A, the result is N/A.

If R is N/A, an error is returned.

Sample Usage

result_code value dblmetaphone(result_code;value)
'first' 'Smith' 'SM0'
'first' 'Smythe' 'SM0'
'first' 'Schmidt' 'XMT'
'first' '' NA
'second' 'Smith' 'XMT'
'second' 'Smythe' 'XMT'
'second' 'Schmidt' 'SMT'
'second' '' NA
'both' 'Smith' 'SM0_XMT'
'both' 'Smythe' 'SM0_XMT'
'both' 'Schmidt' 'XMT_SMT'
'both' '' '_'

Additional Information

  • This function is not Unicode (UTF-8) compliant.