DECIMAL

DECIMAL returns the decimal value of x, with a precision specified by p and q. The result has the mode and scale of x.

Read syntax diagramSkip visual syntax diagramDECIMAL( x, p, q)

Abbreviation: DEC

x
Reference.
p
Restricted expression specifying the number of digits to be maintained throughout the operation.
q
Restricted expression specifying the scaling factor of the result. For a fixed-point result, if p is given and q is omitted, a scaling factor of zero is assumed. For a floating-point result, q must be omitted.

If both p and q are omitted, the precision of the result is determined from the rules for base conversion.