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.




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 |