16
Arithmetic overflow during %S_MSG conversion of %s value '%s' to a %s field.
Error 247 occurs when Adaptive Server attempts to convert a given value from one data type to another, but is unable to do so because of incompatibilities between the datatypes, or when the receiving field (the “to” field in the message) does not have a range large enough to accommodate the converted value.
The error may be raised during either explicit or implicit conversions. Explicit conversions occur when a query explicitly requests a conversion with the convert, inttohex, or hextoint functions.
Implicit conversions occur when Adaptive Server is required to perform certain types of comparisons between heterogeneous datatypes, and when the server stores and retrieves data. Adaptive Server automatically handles many such conversions from one datatype to another, but may be unable to handle the conversion due to the reasons mentioned above.
For example:
1> create table deliver_dates 2> (itemno int, 3> dlydate smalldatetime) 4> go 1> insert into deliver_dates 2> values (42298, '12/12/2080') 3> go
Line 1: Arithmetic overflow during implicit conversion of VARCHAR value '12/12/2080' to a SMALLDATETIME field.
The date value being inserted is outside the range of SMALLDATETIME.
Check the following problem areas when error 247 is raised:
Is the range of the receiving datatype large enough to accommodate the converted value?
Are the sending and receiving datatypes (the of and to datatypes in the message, respectively) compatible? For details, see the section “Datatype conversion functions” in the Transact-SQL Functions chapter in Reference Manual: Building Blocks.
Is the query attempting to display a FLOAT value by converting it to numeric datatype? FLOAT values can only be displayed this way if no decimal digits are lost. Try increasing the precision of the numeric field so that this condition is met.
If the query is updating a table, is there a trigger on the table that attempts to place the new value into another table? The receiving field in the second table may not have the correct range for the operation.
Be sure to have the information listed in “Reporting errors” when you contact Sybase Technical Support, including the text of the query that produced the error.
All versions