Extended LOAD TABLE Syntax

LOAD TABLE has extended syntax for loading large object data.

LOADINTO ] TABLEowner ].table-name
... ( column-name load-column-specification [, ...] )
... FROM 'filename-string' [, ...]
... [ QUOTESON | OFF } ]
... ESCAPES OFF
... [ FORMATascii | binary | bcp } ]
... [ DELIMITED BY 'string' ]
... 
load-column-specification:
... 
| { BINARY | ASCII } FILEinteger )
| { BINARY | ASCII } FILE ( 'string' )

The keywords BINARY FILE (for LONG BINARY) or ASCII FILE (for LONG VARCHAR) specify to the load that the primary input file for the column contains the path of the secondary file (which contains the LONG BINARY or LONG VARCHAR cell value), rather than the LONG BINARY or LONG VARCHAR data itself. The secondary file pathname can be either fully qualified or relative. If the secondary file pathname is not fully qualified, then the path is relative to the directory in which the server was started. Tape devices are not supported for the secondary file.

Sybase IQ supports loading LONG BINARY and LONG VARCHAR values of unlimited length (subject to operating system restrictions) in the primary load file. When binary data of hexadecimal format is loaded into a LONG BINARY column from a primary file, Sybase IQ requires that the total number of hexadecimal digits is an even number. The error "Odd length of binary data value detected on column" is reported, if the cell value contains an odd number of hexadecimal digits. Input files for LONG BINARY loads should always contain an even number of hexadecimal digits.

Sybase IQ does not support loading large object columns from primary files using LOAD TABLE…FORMAT BINARY. You can load large object data in binary format from secondary files.

For details on loading data using binary format, see System Administration Guide: Volume 1 > Data Import and Export > Binary Load Formats.

For LOAD TABLE FORMAT BCP, the load specification may contain only column names, NULL, and ENCRYPTED. This means that you cannot use secondary files when loading LONG BINARY and LONG VARCHAR columns using the LOAD TABLE FORMAT BCP option.

See Reference: Statements and Options > SQL Statements > LOAD TABLE Statement.