S05010

Error Code

S05010

Error Message

scale out of bounds (valid range: [0, 9], but get: <xxx>). RefId: S05010

scale out of bounds (valid range: [0, 18], but get: <xxx>). RefId: S05010

scale out of bounds (valid range: [0, 38], but get: <xxx>). RefId: S05010

Probable Causes

Each DECIMAL type has a valid range for its scale. This error occurs when the scale of a DECIMAL value exceeds the corresponding range.

The valid scale range of each DECIMAL type is as follows:

  • DECIMAL32: [0, 9]

  • DECIMAL64: [0, 18]

  • DECIMAL32: [0, 38]

For example, an error may arise because the scale of DECIMAL32 exceeds [0, 9] and that of DECIMAL64 exceeds [0, 18].

v = decimal32(1 2 3 4, 10)

1.23$DECIMAL64(20)

Solutions

Set the scale of each DECIMAL value to an integer within the corresponding range.

v = decimal32(1 2 3 4, 6)

1.23$DECIMAL64(10)