natcmp()

Function group Execute on client Platform(s)
String NO All

Syntax

natcmp(value1,value2)

Description

Returns the result of comparing two values using the national sort ordering. Returns 0 if the strings are equal, 1 if value1 > value2, and -1 if value1 < value2.

Both values are converted to strings before the comparison is made. natcmp() uses the same rules for comparing the strings as it does for normal strings, except that it uses the national sort ordering.

Example

Calculate lResult as  natcmp(lValue1,lValue2)
# returns 0 if values are equal