Previous | Next | Contents | Index | Navigation | Glossary | Library |
The format of an expression is:
SUBEXPRESSION [operator SUBEXPRESSION ...]
This means that a number of 'subexpressions' can combine in a single expression. For example, the subexpressions (3 + 2) and MONTHS_BETWEEN(start_date, end_date) can combine in a single expression as follows:
(3 + 2) + MONTHS_BETWEEN(start_date, end_date)
Expressions can also be used inside functions, as in the following example:
salary = GREATEST(minimum_wage, (hourly_rate * hours_worked))
GREATEST(minimum_wage, (hourly_rate * hours_worked))
There are some exceptions to this. For example:
DAYS_BETWEEN(date1, date2)
MONTHS_BETWEEN(date1, date2)
These have date operands, but return a numeric value.
So the expression:
4 + days_between(start_date, todays_date)
returns a numeric result.
Previous | Next | Contents | Index | Navigation | Glossary | Library |