Advantage Expression Engine function that creates a descending index key value
DESCEND(<exp>) à ValueInverted
Any valid expression of any data type other than memo, binary, or image. Valid Advantage expressions can consist of field names, literal values, supported operators, and supported functions. For information on operators and functions supported in Advantage expressions, see Advantage Expression Engine.
DESCEND() returns an inverted expression of the same data type as the <exp>, except for dates that return a numeric value. A DESCEND() of CHR(0) always returns CHR(0).
DESCEND() is a conversion function that returns the inverted form of the specified expression to be used when creating multi-segmented indexes where one or more segments should be in descending order. Specify the segment of the index expression you want to be descending as the DESCEND() argument.
To subsequently perform a lookup with a seek operation, you must first evaluate it using the Advantage Client Engine AdsInitRawKey and AdsBuildRawKey APIs.
Only use this function to create a certain segment(s) of a multi-segmented index in descending order. If the entire index expression is to be in descending order, create the index with the "descending" option rather than use the DESCEND() function. If you create an index using the "descending" option, you will not need to perform any special operations before performing a seek. "Descending" is an attribute of the index file where it is stored and used for reindexing purposes.
Advantage TDataSet Descendant
Advantage Client Engine API