MAX()

Advantage Concepts

Advantage Expression Engine function that returns the larger of two numeric or date values

Syntax

MAX( <nExp1>, <nExp2> ) -> nLarger

MAX( <dExp1>, <dExp2> ) -> dLarger

Parameters

<nExp1> and <nExp2>

The numeric values to be compared.

<dExp1> and <dExp2>

The date values to be compared.

Return Values

MAX() returns the larger of the two arguments. The value returned is the same data type as the arguments.

Remarks

MAX() is a numeric and date function that ensures the value of an expression is larger than a specified minimum. The inverse of MAX() is MIN() which returns the lesser of two numeric or date values.

Note Advantage Expression Engine functions can be used in expressions such as 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.

See Also

MIN()