MAXIMUM function
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Compares two or more values and returns the largest value.
Syntax
|
- expression
- A constant, field name, variable name, or expression. If there is a mixture of decimal and integer data types, decimal type is returned.
Example
In
this procedure, if the CreditLimit value is under
20,000, the procedure adds 10,000 to that value. Otherwise, the
procedure sets CreditLimit to 30,000. The MAXIMUM
function determines the greater of the original CreditLimit value
and the new cred-lim2 value.
r-maxmum.p
|
Notes
- When comparing character values, if at least one of the character fields is defined as case sensitive, then MAXIMUM treats all of the values as case sensitive for the sake of the comparisons. If none of the values is case sensitive, MAXIMUM treats lowercase letters as if they were uppercase letters.
- You cannot compare data of different DATE, DATETIME, and DATETIME-TZ data types to each other using MAXIMUM. You must first convert different date and datetime data types to the same data type before doing a comparison between them.