Sybase 12.4.2 Server User Manual


 
Bulk loading data using the LOAD TABLE statement
178
DATE, TIME, DATETIME or TIMESTAMP string as ASCII characters. You
must define the input-date-format or input-datetime-format of the string
using one of the corresponding formats for the
date and datetime data types
supported by Adaptive Server IQ. For information about these, see the
Adaptive Server IQ Reference Manual.
Note The column-spec is for IQ tables only. If you specify a column-spec for
a Catalog Store table, you get an error.
The NULL portion of the column-spec indicates how to treat certain input
values as NULL values when loading into the table column. These characters
can include BLANKS, ZEROS, or any other list of literals you define. When
you specify a NULL value or read a NULL value from the source file, the
destination column must be able to contain NULLs.
The
FILLER clause indicates you want to skip over a specified field in the
source input file. For example, there may be characters at the end of rows or
even entire fields in the input files that you do not want to add to the table. As
with the column-spec definition,
FILLER allows you to specify ASCII fixed
length of bytes, variable length characters delimited by a separator, and binary
fields using
PREFIX bytes. FILLER clause syntax is as follows:
FILLER (
filler-type
)
filler-type
:
{
input-width
| PREFIX { 1 | 2 | 4 } | ’
delimiter-string
’ }
For more information on how to use data conversion options, see “Converting
data on insertion”.
Specifying files to load
You specify one or more files from which to load data. In the FROM clause, you
specify each filename-string, and separate multiple strings by commas.
The files are read one at a time, and processed in a left-to-right order as
specified in the
FROM clause. Any SKIP or LIMIT value only applies in the
beginning of the load, not for each file.
If a load cannot complete, for example due to insufficient memory, the entire
load transaction is rolled back.
filename-string The filename-string is passed to the server as a string.
The string is therefore subject to the same formatting requirements as other
SQL strings. In particular: