Arithmetic overflow error for data type %1!, value = %2!.

Error Message:
Msg 220, Level 16, State 2, Line 2
Arithmetic overflow error for data type %1!, value = %2!.

Severity level:
16.

Description:
This error message appears, when the assigment of a value to a variable fails, because the value is larger than the maximum allowed value for the datatype of the variable.

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.

Versions:
All versions of SQL Server.

Example(s):
DECLARE @dt VARCHAR(10)
SET @dt = ’2007011′
SELECT CAST(@dt AS DATETIME)

Remarks:
SQL Server offers for almost any value an appropriate datatype. If neccesary, you need to choose a larger datatype.




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 |