UNICODEORDER( left, right [, locale ] )
left | The left Unicode expression to evaluate. |
right | The right Unicode expression to evaluate. |
locale | Optional. A string constant containing a valid locale code, as specified in ISO standards 639 and 3166. |
Return: | UNICODEORDER returns a single value. |
The UNICODEORDER function returns either -1, 0, or 1 depending on the evaluation of the left and right expressions. This is equivalent to the <=> equivalence comparison operator but taking the unicode locale as the basis of determination. If left < right then -1 is returned, if left = right then 0 is returned, if left > right then 1 is returned.
Example:
UNICODE1 x := u'a';
UNICODE1 y := u'b';
UNICODE1 z := u'a';
a := UNICODEORDER(x , y, 'es'); // returns -1
b := UNICODEORDER(x , z, 'es'); // returns 0
c := UNICODEORDER(y , z, 'es'); // returns 1
OUTPUT(a);
OUTPUT(b);
OUTPUT(c);
See Also: FROMUNICODE, TOUNICODE