![]() | ![]() |
Home |
|
|
Troubleshooting and Error Messages Guide |
|
| Chapter 3 Error Message Writeups |
|
| Sequencer Errors |
|
| Error 265 |
16
Insufficient result space for %S_MSG conversion of %s value '%s' to a %s field.
Error 265 can be raised in the following situations:
Conversions to character data fails with Error 265 if you attempt a conversion that would cause truncation of data.
Error 265 can also be raised in some conditions when certain system stored procedures are executed.
Examples and corrective action are provided in the next section.
The following sections describe some scenarios under which Error 265 occurs and ways of dealing with those situations.
Conversions of integer to character data will fail if the target format is not large enough to accommodate the data:
1> select convert (char(1), 500) 2> go
Msg 265, Level 16, State 1: Server 'mfg1', Line 1: Insufficient result space for explicit conversion of INT value '500' to a CHAR field.
To correct this problem, choose a larger target format (char(3) in the example).
Conversions of floating point to character data will fail if the target format is not large enough to accommodate the data:
1> select convert (char(10), 3.1415e) 2> go
Msg 265, Level 16, State 1: Server 'mfg1', Line 1: Insufficient result space for explicit conversion of FLOAT value '3.1415000000000002' to a CHAR field.
As in this example, the trailing part of the source value reported in the error message can be different from the entered value. This is because FLOAT is an approximate numeric datatype whose internal representation (and rounding upon display) are platform-dependent.
To correct this problem, choose a larger target format for display. Use the str function to determine the necessary format. The required format varies depending upon the number being converted and the accuracy of floating point numbers supported by your platform. To guarantee success, use a target of 25 characters.
If loss of precision (rather than display format) is a concern in the application, consider using an exact numeric datatype such as integer, numeric or decimal.
Refer to the Transact-SQL User's Guide for information about the str function.
All versions
|
|