LOAD TABLE supports BCP files as input [CR 437332]

Sybase IQ 12.7 ESD #2 supports using a BCP character file as input to the LOAD TABLE command. The BCP input file must be generated by the BCP OUT command with the -c option. The LOAD TABLE FORMAT BCP feature is an alternative to the iq_bcp utility and will perform better than iq_bcp in all cases.

Syntax

LOADINTO ] TABLEowner.]table-name
... ( load-specification [, …] )
... FROM { 'filename-string' | filename-variable } [, …]
... [ CHECK CONSTRAINTSON | OFF } ]
... [ DEFAULTSON | OFF } ]
... QUOTES OFF
... ESCAPES OFF
... [ FORMATascii | binary | bcp } ]
... [ DELIMITED BY 'string' ]
... 

Parameters

load-specification:{ column-namecolumn-spec ] | FILLERfiller-type ) } column-spec:{ ASCIIinput-width ) | BINARYWITH NULL BYTE ] | PREFIX1 | 2 | 4 } | 'delimiter-string' | DATEinput-date-format ) | DATETIMEinput-datetime-format ) } [ NULL ( { BLANKS | ZEROS | 'literal',  …} ) ] | ENCRYPTED (data-typekey-string’ [, ‘algorithm-string’ ] )

Example

The following LOAD TABLE statement is now supported with the FORMAT BCP load option:

LOAD TABLE t1 (c1, c2, c3)
FROM ‘bcp_file.bcp’
FORMAT BCP
...

Usage

FORMAT Sybase IQ supports ASCII and binary input fields. The format is usually defined by the column-spec described above. If you omit that definition for a column, by default Sybase IQ uses the format defined by this option. Input lines are assumed to have ascii (the default) or binary fields, one row per line, with values separated by the column delimiter character.

Sybase IQ also accepts data from BCP character files as input to the LOAD TABLE command.

Error messages

Sybase IQ no longer returns an error message when FORMAT BCP is specified as a LOAD TABLE option.