RANK Function

Returns the position of a character in the ASCII or EBCDIC collating sequence.

Category: Character
Returned data type: DOUBLE

Syntax

RANK(expression)

Arguments

expression

specifies any valid expression that evaluates to a character string.

Data type NCHAR
See <sql-expression>
FedSQL Expressions

Details

The RANK function returns an integer that represents the position of the first character in the character expression.

Example

The following statement illustrates the RANK function:
Statement
Result
ASCII
EBCDIC
select "rank"('A');
 65
 193
Note: RANK is a FedSQL reserved word. The RANK function must be specified as a delimited identifier.

See Also

Functions:
Last updated: February 23, 2017