Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 206

Table of Contents

Advertisement

Bulk loading data using the LOAD TABLE statement
LOAD TABLE adds
rows
Simple LOAD TABLE
Example
186
START ROW ID option
where insertions should begin. This option is used for partial-width insertions,
which insert into a subset of the columns in the table. If you are inserting data
into an existing row, you must define the format of each input column with a
column-spec, and use
START ROW ID
insert it. The default is 0, which causes data to be inserted in a new row
wherever there is space in the table. Be sure to read "Partial-width insertions"
before using this option and performing partial-width inserts.
UNLOAD FORMAT option
format produced by the
UNLOAD
specifically for upgrading to Adaptive Server IQ 12.x. This format places
certain restrictions on other load options you specify:
The format in the column specifications must be
Specifying
,
ASCII
PREFIX
You must not use the load options
.
BY
To allow NULLs in the data you must specify
in the column specification. You cannot include
in any other way.
For the sake of consistency with the data being loaded, you can specify
BINARY WITH NULL BYTE
does not allow NULLs (as specified in
However, if you try to load any data into a column that does not allow
NULLs, you receive an error.
See the Adaptive Server IQ Installation and Configuration Guide for more
information on upgrading.
The
statement appends the contents of the file to the existing
LOAD TABLE
rows of the table; it does not replace the existing rows in the table, unless you
specify the
START ROW ID
examples of how you use this option to insert data into existing rows.
If you want to empty out an existing table and reload it, you can use the
statement to remove all the rows from a table.
TRUNCATE TABLE
The following statement loads the data from the file dept.txt into all columns
of the
table. This example assumes that no explicit data conversion
department
is needed, and that the width of input columns matches the width of columns
in the
table.
department
LOAD TABLE department
FROM 'dept.txt'
Specifies the id number of a row in the table
to identify the row where you want to
Specifies that the data in the input file is in the
command in Adaptive Server IQ 11.5.1,
,
, or string-delimiter causes an error.
FILLER
DELIMITED BY
BINARY WITH NULL BYTE
even when loading into a table column that
CREATE TABLE
load option. See "Partial-width insertions" for
, the default.
BINARY
and
ROW DELIMITED
in the column-spec
NULL
or
).
ALTER TABLE

Advertisement

Table of Contents
loading

Table of Contents