Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 214

Table of Contents

Advertisement

Inserting selected rows from the database
Example
Importing data from
pre-Version 12
Adaptive Server IQ
194
LOCATION 'detroit.asiq11db'
{ SELECT l_shipdate, l_orderkey
FROM lineitem }
The destination and source columns may have different names.
The order in which you specify the columns is important, because data
from the first source column named is inserted into the first target column
named, and so on.
You can use the predicates of the
command to insert data from only certain rows in the table.
This example inserts the same columns as the previous example, but only for
the rows where the value of
INSERT INTO lineitem
(l_shipdate, l_orderkey)
LOCATION 'detroit.asiqdb'
{ SELECT l_shipdate, l_orderkey
FROM lineitem
WHERE l_orderkey = 1 }
Note
If you use
START ROW ID
the destination table, the columns in remaining rows of the destination table
will be NULLs, if NULLs are legal values. See "Partial-width insertions" for
more information.
To import data from an Adaptive Server IQ database version earlier than 12.0,
you must use of the following methods:
The
command with the
LOAD TABLE
The
INSERT...LOCATION
You cannot use other forms of the
For more information on loading from an older version, see the Adaptive
Server IQ Installation and Configuration Guide.
statement within the
SELECT
is 1.
l_orderkey
and you select fewer columns than exist in
UNLOAD FORMAT
syntax
command.
INSERT
INSERT
option.

Advertisement

Table of Contents
loading

Table of Contents