Previous Topic: SIGN Function--Return the Sign of a Number

Next Topic: SPACE Function--Return a String of Spaces

SORT Function--Sort a Set

The SORT function sorts a specified set. Case sensitivity is specified by an optional Boolean parameter. Duplicate items are eliminated from the resulting set.

Syntax

The SORT function has the following format:

SORT(source_set[, not_case_sensitive]

Parameters

The SORT function accepts the following parameters:

source_set (string)

Set to be sorted.

not_case_sensitive (Boolean)

(Optional) If this parameter is omitted or set to FALSE, the sort treats entries as identical unless the cases are different. If this parameter is set to TRUE, the sort ignores case.

Return Value

The SORT function returns a set.

Examples

Return_value=SORT("Eric^Bart^Chuck^BART^Chuck") Return_value="BART^Bart^Chuck^Eric"

Return_value=SORT("Eric^Bart^Chuck^BART^Chuck", FALSE) Return_value="BART^Bart^Chuck^Eric"

Return_value=SORT("Eric^Bart^Chuck^BART^Chuck", TRUE) Return_value="Bart^Chuck^Eric"


Copyright © 2010 CA. All rights reserved. Email CA about this topic