The conversion from char data type to smallmoney data type resulted in a smallmoney overflow error.

Error Message:
Msg 294, Level 16, State 0, Line 1
The conversion from char data type to smallmoney data type resulted in a smallmoney overflow error.

Severity level:
16.

Description:
This error message appears when you try to convert a string to the SMALLMONEY datatype, but the resulting value is beyond the allowed range for a SMALLMONEY value.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
Error of the Severity level 16 are generated by the user and can be fixed by the SQL Server user. Either the offending data needs to be corrected or a wider datatype has to be choosen.

Versions:
All versions of SQL Server.

Example(s):
SELECT CAST(‘- 214,748.3649’ AS SMALLMONEY)

Remarks:
The use of the (SMALL)MONEY datatype should very carefully be considered. That datatype might be deprecated in future versions of SQL Server and, equally important, its use has its own implications and pitfalls. THE DECIMAL datatype is a standard ANSI-SQL datatype, thus portable and more precise in calculations.

]]>

Leave a comment

Your email address will not be published.