Converting data on insertion
204
You can use a synonym interchangeably with its standard data type. Data is
stored internally as the standard data type, where synonyms exist. In error
messages, the standard name appears in place of the synonym.
Note By default, Adaptive Server IQ assumes that input data is binary
(numeric data) and tries to insert it that way. However, this presumes that the
input column length in bytes must match the destination column length in
bytes. If not, the insert will fail or lead to unexpected results. For example, if
you attempt to insert an input column with integer data of 4 bytes into a
SMALLINT destination column, Adaptive Sever IQ loads only the first 2 bytes
of that input column.
Inserting data from pre-Version 12 Adaptive Server IQ
If you are moving data into Adaptive Server IQ Version 12 from an earlier
version, you must convert certain data types before inserting or loading them.
For details, see “Migrating Data from Previous Versions” in the Adaptive
Server IQ Installation and Configuration Guide.
Load conversion options
The following table lists the conversion options for the LOAD TABLE statement
in alphabetical order and gives a brief description of what each option does. For
a detailed description of each option, see the sections that follow. To use these
options in the
LOAD TABLE statement, see “Specifying load options”.
Table 5-5: Conversion options for loading from flat files
Option
Adaptive Server IQ
Datatypes Action
ASCII TINYINT, SMALLINT, INT (or
INTEGER), UNSIGNED INT,
BIGINT, UNSIGNED BIGINT,
NUMERIC (or DECIMAL),
REAL, DOUBLE, BIT, DATE,
TIME, TIMESTAMP (or
DATETIME)
By default, Adaptive Server IQ assumes input data is binary of
appropriate width for the datatype. Using
ASCII allows you to tell
Adaptive Server IQ that data is in character format and lets you
specify how wide it is. This option allows E notation for
REAL
data, but it can hinder your performance.