
5-6 Implement: Making Required Application Changes
If Your Current Version is 4.x Adaptive Server Enterprise 11.5
Example
In release 4.x, money was above float in the hierarchy. It is now below
both float and numeric. For example, the following query:
select $12 * 8.9
returns a result of type numeric. In release 4.x, this query returned
money. Likewise, the following query:
select $12 * 8.9e0
returns a result of type float. In release 4.x, this query returned money.
If you want the release 4.x behavior you must use
convert:
select $12 * convert(money,$12 * 8.9e0)
Datatype Conversions
The following changes apply to datatype conversions:
• Numeric to character conversion: release 4.x float-to-character
conversion allowed some truncation without warning. In release
10.x and 11.x, all conversions to character succeed only if no
decimal digits are lost. Previously, floating point to character
conversions allowed some truncation without warning.
• Conversion to money: All conversions to money datatypes round
to four places.
• Explicit conversion from numeric to numeric: When an explicit
conversion of one numeric value to another results in loss of
sysname 19
nvarchar 19
char 20
nchar 20
varbinary 21
timestamp 21
binary 22
text 23
image 24
Table 5-3: Datatype hierarchy
Name Hierarchy
Comentarios a estos manuales