The TRUNC function will truncate the given numeric value to the specified position either before or after the decimal. The first parameter to the function is the value to be truncated and will be evaluated as either a decimal or integral number, matching the context of the function call. The second parameter is evaluated as an integral number and specifies the precision, or number of digits to which the value should be truncated. A positive precision value counts the number of digits to the right of the decimal, while a negative precision counts them to the left of the decimal. Note that this function differs from the ROUND function in that no rounding occurs. The number is truncated to the specified precision with no rounding behavior.
@TRUNC (Number [, Precision]) | |
---|---|
Number | Required parameter; evaluated as either an integral or decimal
number matching the context of the function call. Contains the value
to be truncated by the function. |
Precision | Optional integral number parameter; contains the value specifying
the precision of the resulting truncation. Positive values indicate
the number of places to the right of the decimal, while negative
values indicate the number of places to the left. |