Built-in Functions → bin

bin() is a string function that returns one of two strings based on whether a value exceeds a threshold or not.


bin(double exp, string c1, double d1,...,string default)

The following table illustrates the bin() parameters:

double expThe double expression to be evaluated
string c1The string value returned if the the double exp is less than double d1
double d1The limit value to compare against the double exp
string defaultThe string value returned if the double exp is greater than or equal to double d1, d2, etc.




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")