MINIMUM function
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Compares two or more values and returns the smallest.
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
This
procedure prompts the user for an item number and how many of the item
they want. If the number of items a user wants (stored in the want
variable) is the minimum of the want variable and the OnHand field, the
procedure displays an "enough in stock" message. Otherwise, the
procedure displays a "not enough in stock" message.
r-minmum.p
|
Notes
- When comparing character values, if at least one of the character fields is defined as case sensitive, then MINIMUM treats all of the values as case sensitive for the sake of the comparisons. If none of the values is case sensitive, MINIMUM 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 MINIMUM. You must first convert different date and datetime data types to the same data type before doing a comparison between them.