The LE (less than or equal to) function determines whether a source value is less than or equal to another source value. If the first value specified is less than or equal to than the second value specified, a true (1) is returned. Otherwise, a false (0) is returned. The LE function operates in the opposite manner as the GE function. The less than or equal to symbol (<=) can also be used to perform this function and is the recommended method.
Category
Boolean
Syntax
LE(value1, value2)
or
value1 <= value2
Parameters and Descriptions
Parameter | Description |
---|---|
value1 | This parameter specifies the first value to be used in the less than or equal to comparison. If this value is less than or equal to the second source value, the result is true and a one (1) is returned. The source value may be a field/column of a datastore, a literal value (i.e. ABC) or the result of another Function. |
value2 | This parameter specifies the second value to be used in the less than or equal to (LE) comparison function. The source value may be a field/column of a datastore, a literal value (i.e. ABC) or the result of another Function. |
1 | 0 | Indicates whether a TRUE (1) or FALSE (0) was returned from the LE function. |
Example
Compare each employee’s yearly salary (YR_WAGE) to determine who is being paid $75,000 or less per year. If the condition is true (1), set the variable WITHIN_RANGE to the constant Y. Otherwise, set the variable WITHIN_RANGE to the constant N.
IF YR_WAGE <= '75000'
{
WITHIN_RANGE = 'Y'
}
ELSE
{
WITHIN_RANGE = 'N'
}