As of Sybase IQ 15.2 ESD #2, you can use the HEADER SKIP clause to specify a number of lines at the beginning of the data file, including header rows, for LOAD TABLE to skip. All LOAD TABLE column specifications and other load options are ignored.
LOAD [ INTO ] TABLE [ owner.]table-name ... ( load-specification [, …] ) ... { FROM | USING [ CLIENT ] FILE } { 'filename-string' | filename-variable } [, …] . . . ... [ HEADER SKIP number [ HEADER DELIMITED BY ‘string’ ] ]
number: the number of lines to skip; greater than or equal to zero
string: the line delimiter, 1 to 4 characters in length; default is ‘\n’
Example 1 Ignore one header row at the beginning of the data file, where the header row is delimited by ‘&&’.
LOAD TABLE ...HEADER SKIP 1 HEADER DELIMITED by '&&'
Example 2 Ignore 2 header rows at the beginning of the data file, where each header row is delimited by ‘\n’.
LOAD TABLE ...HEADER SKIP 2
You can use the HEADER SKIP clause to specify a number of lines at the beginning of the data file, including header rows, for LOAD TABLE to skip.
Lines are determined by a delimiter string specified in the HEADER DELIMITED BY clause. The default HEADER DELIMITED BY string is the ‘\n’ character.
The HEADER DELIMITED BY string has a maximum length of four characters. An error is returned, if the string length is greater than four or less than one.
When a non-zero HEADER SKIP value is specified, all data inclusive of the HEADER DELIMITED BY delimiter is ignored, until the delimiter is encountered the number of times specified in the HEADER SKIP clause.
All LOAD TABLE column specifications and other load options are ignored, until the specified number of rows has been skipped. After the specified number of rows has been skipped, the LOAD TABLE column specifications and other load options are applied to the remaining data.
The “header” bytes are ignored only at the beginning of the data. When multiple files are specified in the USING clause, HEADER SKIP only ignores data starting from the first row of the first file, until it skips the specified number of header rows, even if those rows exist in subsequent files. LOAD TABLE does not look for headers once it starts parsing actual data.
No error is reported, if LOAD TABLE processes all input data before skipping the number of rows specified by HEADER SKIP.