CHAPTER 5 Moving Data In and Out of Databases

When an arithmetic operation results in a higher scale than the predetermined scale, Adaptive Server IQ truncates the results to fit the scale after it has been determined using the rules defined in the Adaptive Server IQ Reference Manual.

If your results require rounding of the values instead of truncation, you should use the ROUND function in your command. However, for inserts, the ROUND function can only be part of its query expression.

The maximum precision for numeric data is 126.

Matching Adaptive Server Enterprise data types

The tables below show which Adaptive Server IQ data types are compatible with Adaptive Server Enterprise data types.

Here are some general rules:

Adaptive Server IQ character string types accept any Adaptive Server Enterprise character string type.

Adaptive Server IQ exact numeric types accept any Adaptive Server Enterprise number types. However, if the Adaptive Server IQ data type holds a smaller amount of data than the Adaptive Server Enterprise type, the value converts to a NULL (for example, when inserting data from the underlying database into tables).

Adaptive Server IQ date/time types accept any Adaptive Server Enterprise date/time types.

Unsupported Adaptive Server Enterprise data types

These Adaptive Server Enterprise data types are not supported by Adaptive

Server IQ in this version:

nchar

nvarchar

text

varbinary

image

217

Page 237
Image 237
Sybase 12.4.2 manual Matching Adaptive Server Enterprise data types, Unsupported Adaptive Server Enterprise data types, 217