Built-in Functions → bin
bin() is a string function that returns one of two string
s based on whether a value exceeds a threshold or not.
Signature
bin(double exp, string c1, double d1,...,string default)
The following table illustrates the bin() parameters:
Parameter | Description |
---|---|
double exp | The double expression to be evaluated |
string c1 | The string value returned if the the double exp is less than double d1 |
double d1 | The limit value to compare against the double exp |
string default | The string value returned if the double exp is greater than or equal to double d1, d2, etc. |
Returns
string
Example
Mark the employees with employee number below 4 with the "low" string and those with employee number 4 or above with the "high" string.
bin(INCORTA.ADMIN_EMP.EMPNO, "low", 4, "high")