Bulk loading data using the LOAD TABLE statement

ROLLBACK aborts the entire transaction (the default).

FINISH finishes the insertions already completed and ends the load operation.

CONTINUE returns an error but only skips the file to continue the load operation. You cannot use this option with partial-width inserts.

PREVIEW option Displays the layout of input into the destination table including starting position, name, and data type of each column. Adaptive Server IQ displays this information at the start of the load process. If you are writing to a log file, this information is also included in the log.

This option is especially useful with partial-width inserts. It can help you diagnose failed or skewed insertions due to incompatible data types, or destination column alignment that does not match source columns. Look at the expected column data type and starting position information to determine if you need to use an insert conversion option on a column and/or where and how much filler to use.

Note PREVIEW ON helps you determine if a load is correct. It does not stop the load from occurring.

ROW DELIMITED BY option Specifies a string up to 4 bytes in length that indicates the end of an input record. You can use this option only if all fields within the row are any of the following:

Delimited with column terminators

Data defined by the DATE or DATETIME column-specoptions

ASCII fixed length fields

The row delimiter can be any string of from 1 to 4 8-bit codes, including any combination of printable characters, and/or any 8–bit hexadecimal code that represents a non-printing character. For example, you specify \x09 to represent a tab as the terminator. For a null terminator (no visible terminator as in “C” strings), you specify \x00.

To use the newline character as a row delimiter, you can specify either the special combination '\n' or its ASCII value '\x0a'.

184

Page 204
Image 204
Sybase 12.4.2 manual 184