Show TOC

MAX_CLIENT_NUMERIC_SCALE OptionLocate this document in the navigation structure

Controls the maximum scale for numeric data sent to the client.

Allowed Values

0 – 126

Default

0

Scope

Option can be set at the database (PUBLIC) or user level. At the database level, the value becomes the default for any new user, but has no impact on existing users. At the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY PUBLIC OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Remarks

When SAP IQ performs its calculation, it promotes data types to an appropriate scale and size that ensure accuracy. The promoted data type might be larger than the original defined data size. You can set this option to the scale you want for numeric results.

Multiplication, division, addition, subtraction, and aggregate functions can all have results that exceed the maximum precision and scale.

For example, when a DECIMAL(88,2) is multiplied with a DECIMAL(59,2), the result could require a DECIMAL(147,4). With MAX_CLIENT_NUMERIC_PRECISION of 126, only 126 digits are kept in the result. If MAX_CLIENT_NUMERIC_SCALE is 4, the results are returned as a DECIMAL(126,4). If MAX_CLIENT_NUMERIC_SCALE is 2, the result are returned as a DECIMAL(126,2). In both cases, there is a possibility for overflow.