The scale must be less than or equal to the precision

Error Message:
Msg 192, Level 15, State 1, Line 1
The scale must be less than or equal to the precision.

Severity level:
15.

Description:
This error message appears when you try to declare a variable of type DECIMAL (synonym NUMERIC) in which the number of decimal places is greater than the number of digits that the variable can store altogether.

Consequences:
The SQL statement cannot be parsed and further execution is stopped.

Resolution:
Error of the Severity Level 15 are generated by the user and can be fixed by the SQL Server user. You must either reduces the number of decimal places in the variable declaration or choose a wider variable type that can store the specified number of decimal places.

Versions:
All versions of SQL Server

Example(s):
DECLARE @MyDecimal DECIMAL(10,11)

Remarks:
This error message is raised only in case of variables. When you try that with a table column instead, error 183 is raised.

]]>

Leave a comment

Your email address will not be published.