FGL_DECIMAL_TRUNCATE()

Returns a decimal truncated to the precision passed as parameter.

Syntax

FGL_DECIMAL_TRUNCATE(
   value DECIMAL,
   decimals INTEGER )
  RETURNING result DECIMAL
  1. value is the decimal to be converted.
  2. decimals defines the number of digits after the decimal point.

Usage

This function truncates the decimal to the number of decimal digits specified.

The value is not rounded, it is just truncated. For example, when truncating 12.345 to 2 decimal digits, the result will be 12.34, not 12.35.