Release 10.1A: OpenEdge Data Management:
SQL Reference

> ## LEAST

> Returns the lowest value among the values of the given expressions.

> #### Syntax

>     LEAST ( expression , expression, ... )

> Example

> This example illustrates the `LEAST` function:

>     SELECT cust_no, last_name,
>          LEAST (ADD_MONTHS (start_date, 10), SYSDATE)
>          FROM customer ;

> #### Notes

> - The first argument to the function can be of any type. However, the types of the subsequent arguments must be compatible with that of the first argument.

> - The type of the result is the same as that of the first argument.

> - If any of the argument expressions evaluate to `NULL`, the result is `NULL`.

> - When the data type of an `expression` is either `CHARACTER`(`length`) or `VARCHAR`(`length`), the `expression` can contain multi-byte characters. The sort weight for each character is determined by the collation table in the database.

> ##### Compatibility

> Progress extension

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095