Function Expressions

A function expression can return one or more values from built-in SQL functions or from user-defined functions, as the following diagram shows.
Read syntax diagramSkip visual syntax diagram
Function Expressions

    (1)                            (2)                       
|--------+-| Algebraic Functions |-----------------------+------|
         |                          (3)                  |   
         +-| CARDINALITY Function |----------------------+   
         |                      (4)                      |   
         +-| SQLCODE Function |--------------------------+   
         |                     (5)                       |   
         +-| DBINFO Function |---------------------------+   
         |                                         (6)   |   
         +-| Encryption and Decryption Functions |-------+   
         |                                           (7) |   
         +-| Exponential and Logarithmic Functions |-----+   
         |                  (8)                          |   
         +-| HEX Function |------------------------------+   
         |                      (9)                      |   
         +-| Length Functions |--------------------------+   
         |                           (10)                |   
         +-| OLAP Window Functions |---------------------+   
         |                                      (11)     |   
         +-| Security Label Support Functions |----------+   
         |                                  (12)         |   
         +-| Smart-Large-Object Functions |--------------+   
         |                    (13)                       |   
         +-| Time Functions |----------------------------+   
         |                             (14)              |   
         +-| Trigonometric Functions |-------------------+   
         |                                   (15)        |   
         +-| String-Manipulation Functions |-------------+   
         |                                (16)           |   
         +-| IFX_ALLOW_NEWLINE Function |----------------+   
         |                            (17)               |   
         '-| User-Defined Functions |--------------------'   

Notes:
  1. Informix® extension
  2. See Algebraic Functions
  3. See CARDINALITY Function
  4. See SQLCODE Function (SPL)
  5. See DBINFO Function
  6. See Encryption and decryption functions
  7. See Exponential and Logarithmic Functions
  8. See HEX Function
  9. See Length functions
  10. See OLAP window expressions
  11. See Security Label Support Functions
  12. See Smart-Large-Object Functions
  13. See Time Functions
  14. See Trigonometric Functions
  15. See String-Manipulation Functions
  16. See IFX_ALLOW_NEWLINE Function
  17. See User-Defined Functions
The following examples show function expressions:
EXTEND (call_dtime, YEAR TO SECOND)
HEX (LENGTH(123))
MDY (12, 7, 1900 + cur_yr)
TAN (radians)
DATE (365/2)
ABS (-32)
LENGTH ('abc') + LENGTH (pvar)
EXP (3)
HEX (customer_num)
MOD (10,3)