Data types used to store data from uploaded files and data sets in Db2
IBM® Cognos® Analytics uses Db2 data types for data in uploaded files and data sets that is stored in Db2.
The data is stored in the following Db2 data types:
- All integer types (smallint, integer, and bigint) are stored as bigint.
- All approximate numeric types (real, float, and double) are stored as double.
- All precise numeric values are stored as decimal where the maximum precision is 31.
- All character types (char, nchar, varchar, nvarchar, clob, nlclob) are stored as national varchar with a maximum precision of 8148.
- Boolean is stored as boolean
- Date is stored as date
- Time is stored as Time
- Timestamp is stored as Timestamp
If a source value is a decimal data type with a precision > 31, the query service attempts to store the value as a decimal type with a precision of 31.
If a value is too large, the query service returns an error indicating the source column, value, and logical row number in the input data.
The scale or precision of a value can be reduced by specifying a CAST
expression
with a scale smaller than 31.
Db2 Unicode databases use CODEUNITS32 for national character types.