COMPARESTRING function

Synopsis
This function returns a value that indicates the lexical relationship between 2 strings.
Remarks
Variations
COMPARESTRING(String, String2)
Compares the 2 specified strings.
Parameters
String

Specifies the first string to be compared.

Supported types: String.
String2

Specifies the second string to be compared.

Supported types: String.
Returns
Returned types: Numeric.
Examples
1.

The following example returns 0 after comparing the strings "Matrox" and "Matrox".

COMPARESTRING("Matrox", "Matrox")
2.

The following example does not return 0 after comparing the strings "MATROX" and "Matrox"

COMPARESTRING("MATROX", "Matrox")
3.

The following example does not return 0 after comparing the strings "Matrox" and "Matrox "

COMPARESTRING("Matrox", "Matrox ")