Bulk loading data using the LOAD TABLE statement
176
Using command files
to load data
To load large amounts of data, most users create command files. To create a
command file, follow the instructions in the chapter entitled “Getting Started
with DBISQL” in the Introduction to Adaptive Server IQ.
Transaction
processing and LOAD
TABLE
When you issue the
LOAD TABLE
statement for an IQ table, a savepoint occurs
automatically before the data is loaded. If the load completes successfully,
Adaptive Server IQ releases the savepoint. If the load fails, the transaction rolls
back to the savepoint. This approach gives you flexibility in committing
transactions. For example, if you issue two
LOAD TABLE
commands, you can
ensure that either both commit or neither.
When you issue
LOAD TABLE
for a Catalog Store table, there is no automatic
savepoint. If the load succeeds, it commits automatically. If the load fails, it
rolls back. You cannot roll back a successful load of a Catalog Store table.
For more information on transaction processing, see Chapter 8, “Transactions
and Versioning”.
Summary of LOAD
TABLE syntax
The basic form of the
LOAD TABLE
statement is:
LOAD TABLE [
owner ].table-name
[ (
load-specification, ... ) ]
FROM ’
filename-string’, ...
[ FORMAT { ’ascii’ | ’binary’ } ]
... [ DELIMITED BY
string ]
... [ STRIP { ON | OFF } ]
... [ QUOTES { ON | OFF } ]
... [ ESCAPES { ON | OFF } ]
[ ESCAPE CHARACTER character ]
[ WITH CHECKPOINT ON|OFF ]
... [
load-options ]
Load specification
The load-specification does the following:
•
Lists each column to be loaded and describes the data in it. A column can
contain fixed-length data, variable-length characters delimited by a
separator, or data that uses a binary prefix to represent the number of bytes
being read.
•
Specifies
FILLER
format for any fields you want to skip.
The syntax for load-specification is as follows:
load-specification:
{
column-name [ column-spec ] |
FILLER (
filler-type ) }
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 ...