EDIT_DISTANCE Function

Returns the number of corrections that would need to be applied to transform one string into the other.

Category: String
Returned data type: Integer

Syntax

EDIT_DISTANCE("string1", "string2")

Required Arguments

"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

Details

The EDIT_DISTANCE function returns the number of corrections that need to be applied to transform string1 into string2.

Example

distance = edit_distance("hello", "hllo" )

// outputs 1

 

distance = edit_distance("hello", "hlelo" )

// outputs 2

 

distance = edit_distance("hello", "hey" )

// outputs 3