When a comparison (such as =) is performed between arguments with different data types, one or more arguments must be converted so that the comparison operation is done using one data type.
Some rules may lead to conversions that fail, or lead to unexpected results from the comparison. In these cases, you should explicitly convert one of the arguments using CAST or CONVERT.
You can override these conversion rules by explicitly casting arguments to another type. For example, to compare a DATE and a CHAR as a CHAR, explicitly cast the DATE to a CHAR.
Lossy conversion and substitution characters
Comparisons between CHAR and NCHAR
Comparisons between numeric data types
Comparisons of dates and times
Comparisons of composite types
Transact-SQL string to date/time conversions
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|