Advantage Expression Engine

Advantage Concepts

The Advantage Expression Engine, which resides in the Advantage server, is used to evaluate expressions within filters or index statements. Successful expression evaluation allows Advantage to build indexes and filter records on the Advantage server. This provides faster results by avoiding the need to send raw data to the client for evaluation.

The Expression Engine can parse and evaluate operators, fields (columns), literal values, and many functions within the expression. The functions supported by the Advantage Expression Engine are listed below. These functions are only used by the Advantage Expression engine in record filter expressions and index expressions. They are not necessarily scalars supported within SQL statements. For a list of supported SQL scalar functions, see Supported Scalar Functions.

Advantage ADT and Visual FoxPro (VFP) table types support true NULL values. If a true NULL value is supplied as part of the expression or as a parameter to an expression engine function listed below, the final result of the expression is NULL. The only exceptions are the EMPTY and ISNULL functions, which always have a True or False result. The EMPTY and ISNULL functions are equivalent on ADT tables and return True when given a NULL value. With VFP tables, NULL and empty are not considered equivalent and the EMPTY and ISNULL functions return True/False appropriately.

The CDX and NTX DBF table types do not support true NULL values. Empty DBF fields are not considered as NULL in the expression engine. Instead, empty DBF fields are treated as its equivalent value. See EMPTY() for more information.

ABS()

NEWIDSTRING()

ALLTRIM()

NOW()

AT()

PAD()

CONTAINS()

PADC()

CHR()

PADL()

COLLATE()

PADR()

CTOD()

RAT()

CTOT()

RECNO()

CTOTS()

REVERSE()

DATE()

RIGHT()

DAY()

ROUND()

DELETED()

RTRIM()

DESCEND()

SPACE()

DTOC()

STOD()

DTOS()

STOTS()

EMPTY()

STR()

I2BIN()

STRZERO()

IF()

SUBSTR()

IIF()

TIME()

L2BIN()

TODAY()

LEFT()

TRANSFORM()

LEN()

TRIM()

LOWER()

TSTOD()

LOWERW()

UPPER()

LTRIM()

UPPERW()

MAX()

VAL()

MIN()

YEAR()

MONTH()

 

User-Defined Functions (UDFs) are not supported in the Advantage Expression Engine. If unsupported functions are used in your expressions, the Advantage Expression Engine will be unable to evaluate the expression.

Directly specifying memo, binary, and image field names in expressions is not supported by the Advantage Expression Engine. If memo, binary, or image fields are used directly or in most expression engine functions in your expressions, the Advantage Expression Engine will be unable to evaluate the expression. The CONTAINS() function is the only Expression Engine function that supports memo, binary, and image fields.

See also:

Expression Engine Operators

Expression Engine Examples

Expression Engine Performance