Fixed point data types represent scaled quantities in a binary
format. They can be SIGNED or UNSIGNED.
o You can declare the total number of DIGITS and the number of
those digits that are FRACTIONS. The number of digits must be
greater than 0 and less than 32. The number of fractions must
not be greater than the number of digits. The default number of
fractions is 0.
o You can specify a SCALE as an implied exponent. The signed
integer must be in the range -128 to 127. The SCALE
specification indicates the number of places to shift the decimal
point when the field is evaluated. A negative specification
indicates a shift of the specified number of places to the left,
and a positive specification indicates a shift of the specified
number of places to the right.
When using SCALE, note the following rules:
- The SCALE specification and the FRACTIONS specification have
a similar function. They both indicate how many digits in a
field are to the right of the decimal point. There are,
however, two important differences:
o The number of FRACTIONS you can specify is limited to the
number of DIGITS you declare for the data type. With
SCALE, there is no such limitation.
o With SCALE, you can shift the decimal point to the right
and to the left, but with FRACTIONS, you can shift the
decimal point only to the left.
- Use a positive integer in the SCALE specification to move the
decimal point to the right.
- Use a negative integer in the SCALE specification to move the
decimal point to the left.
o You can also specify the radix, or BASE, with an unsigned
integer. The BASE indicates the number system to be used when
the field is evaluated. The default BASE is 10.
Additional Information:
explode
extract