Type conversions can happen automatically, or they can be explicitly requested using the CAST or CONVERT function. The following functions can also be used to force type conversions :
DATE function Converts the expression into a date, and removes any hours, minutes or seconds. Conversion errors may be reported.
STRING function This function is equivalent to
CAST( value AS LONG VARCHAR).
VALUE+0.0 Equivalent to CAST( value AS DECIMAL ).
The following list is a high-level view of automatic data type conversions:
There are certain cases where the automatic database conversions are not appropriate. For example, the automatic data type conversion fails in the example below.
'12/31/90' + 5 'a' > 0
Comparisons between data types
Converting NCHAR to CHAR
Converting NULL constants to NUMERIC and string types
Converting dates to strings
Converting bit arrays
Converting between numeric sets
Ambiguous string to date conversions
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|