CHAPTER 5 Moving Data In and Out of Databases
205
Note
When loading from a flat file, use binary data if you have a choice of
using binary or character data. Using binary input can improve performance by
eliminating conversion costs.
Data conversions in IQ
When you use the
INSERT
statement to insert data directly from a database
rather than from a flat file, you cannot use the load conversion options. If the
data requires explicit conversion, you must use one of the conversion
functions,
CAST
or
CONVERT
, in the
SELECT
statement where you specify the
data to be inserted. If the data is converted implicitly, Adaptive Server IQ
handles the conversion automatically.
An implicit or explicit conversion is required whenever data types in a
SELECT
statement need to match, but do not. This occurs when you do an
INSERT
SELECT
from one data type to another, but it also occurs whenever you
compare or compute values for differing data types.
The following tables show:
•
Which conversions Adaptive Server IQ does implicitly (I)
•
Which conversions you must do explicitly (E)
•
Which conversions are unsupported (U)
These conversions apply to data within an Adaptive Server IQ database, or
coming from an Adaptive Server Anywhere database, or any other database
connected as a Specialty Data Store.
ASCII
CHAR, VARCHAR
By default, Adaptive Server IQ assumes same column width
between source and destination columns, which may cause it to
read input file incorrectly. This option lets you specify a different
width for the input column.
DATE
DATE
Converts
ASCII
date input of a fixed format to binary.
DATETIME
TIMESTAMP
(or
DATETIME
)
or
TIME
Converts
ASCII
time or date/time input of a fixed format to
binary. The input specification is based on either a 12-hour or 24-
hour clock.
TIME
TIME
Converts ASCII time input of a fixed format to binary.
NULL
all
Lets you specify which input data values to convert to NULL on
insert.
Option
Adaptive Server IQ
Datatypes Action
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...