
5-4 Implement: Making Required Application Changes
If Your Current Version is 4.x Adaptive Server Enterprise 11.5
Adaptive Server now defaults to the numeric datatype rather than
float. For example, this constant:
5.1
is treated as numeric. If you want to use float, represent the constant
as
5.1e0
In addition, the optimizer has trouble with clauses where float
columns are joined to numeric arguments. Table 5-2 shows some
examples of different representations of constants as a result of this
change:
➤
Pre-release 10.x Client-Library applications running against 10.0 or higher
SQL Servers map
numeric
to
float
.
The mathematical functions that return a value of type numeric rather
than float are:
• abs
• ceiling
• degrees
• floor
• power
• radians
• round
• sign
Table 5-2: Different results with numeric rather than float datatype
Statement 4.9.2 10.0 and later
select 2147483648 integer overflow 2147483648
select 2 * 1.2345678 2.246914 2.24691356
select 2.8 * 5 14.000000 14.0
Kommentare zu diesen Handbüchern