Error 257

Severity

16

Message text

Implicit conversion from datatype '%s' to '%s' is not allowed.  Use the CONVERT function to run this query.

Explanation

When performing certain types of comparisons, and while storing and retrieving data, Adaptive Server automatically handles many conversions from one datatype to another. These are called implicit conversions. You can explicitly request other conversions with the convert, inttohex, and hextoint functions.

Error 257 is raised when Adaptive Server is unable to do an implicit conversion because of incompatibilities between datatypes.

Action

Corrective action depends on the exact situation in which the error occurred. Here are some typical situations where error 257 is raised, and how you can correct the problem:

Additional information

For detailed information about datatype conversions, see the section “Datatype conversion functions” in the chapter “Using the Built-In Functions in Queries” in the most recent Transact SQL User’s Guide.

Before calling Technical Support, have the information on hand listed in “Reporting errors”, including the SQL statement that generated the error.

Versions in which this error is raised

All versions