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.

]]>

Leave a comment

Your email address will not be published.