Returns the number of corrections that would need to be applied to transform one string into the other.
Category: | String |
Returned data type: | Integer |
EDIT_DISTANCE("string1", "string2")
"string1"
a string to be used in the comparison; this can be specified as string constant, field name, or expression
"string2"
a string to be used in the comparison; this can be specified as string constant, field name, or expression
The EDIT_DISTANCE function returns the number of corrections that need to be applied to transform string1 into string2.
distance = edit_distance("hello", "hllo" )
// outputs 1
distance = edit_distance("hello", "hlelo" )
// outputs 2
distance = edit_distance("hello", "hey" )
// outputs 3