Professional Documents
Culture Documents
4.2 Number Functions
4.2 Number Functions
OEHB
Purpose
OEHB
Number Functions
ROUND TRUNC
Number Functions
MOD
OEHB
Round
} ROUND can be used with both numbers and dates.
} It is mainly used to round numbers to a specified number of decimal places,
but it can also be used to round numbers to the left of the decimal point.
Number Functions
} ROUND(45.926) à 46
} ROUND(45.926, 0) à 46
} ROUND(45.926, 2) à 45.93
} ROUND(45.926, -1) à 50
OEHB
TRUNC
} TRUNC
} Can be used with both numbers and dates.
} It is mainly used to terminate the column, expression, or value to a specified
number of decimal places.
Number Functions
} TRUNC (45.926, 0) à 45
} TRUNC (45.926) à 45
OEHB
MOD
} MOD can be used to determine } MOD(5,2) à 1
whether a value is odd or } MOD(4,2) à 0
even.
} If you divide a value by 2 and
Number Functions
} MOD is multiple of X
} Ex.: MOD(9,3) à 0
} Because Is Multiple of 3
OEHB