The scale (%d) for column ‘%.*ls’ must be within the range %d to %d.

Error Message:
Msg 183, Level 15, State 1, Line 3
The scale (%d) for column ‘%.*ls’ must be within the range %d to %d.

Severity level:
15.

Description:
This error message appears when you try to create a column of type DECIMAL (synonym NUMERIC) in which the number of decimal places is greater than the number of digits that column 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 column definition or choose a wider data type that can store the specified number of decimal places.

Versions:
All versions of SQL Server

Example(s):
CREATE TABLE #t
(
 MyDecimal DECIMAL(10,11)
)

Remarks:
This error message is raised only in case of table columns. When you try that with a variable instead, error 192 is raised.




Related Articles :

  • No Related Articles Found

No comments yet... Be the first to leave a reply!

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |