Column Width Issues

SAP Sybase IQ assumes the width of the input data is the same as the destination column width and reads the input file accordingly.

If they are not the same width, SAP Sybase IQ may read too few or too many bytes of the input file for that column. The result is that the read for that column may be incorrect, and the reads for subsequent columns in the input file will also be incorrect, because they will not start at the correct position in the input file.

For example, if input_column1 is 15 bytes wide and destination_column1 is 10 bytes wide, and you do not specify the ASCII conversion option, SAP Sybase IQ assumes the input column is only 10 bytes wide. This is fine for destination_column1, because the input data is truncated to 10 bytes. But it also means that SAP Sybase IQ assumes that the next column in the input file starts at byte 11, which is still in the middle of the first column, instead of at byte 16, which is the correct starting position of the next column.

Conversely, if input_column1 is 10 bytes wide and destination_column1 is 15 bytes wide, and you do not specify the ASCII conversion option, SAP Sybase IQ assumes the input column is 15 bytes wide. This means that SAP Sybase IQ reads all of input_column1 plus 5 bytes into the next column in the input file and inserts this value into destination_column1. So, the value inserts into destination_column1 and all subsequent columns are incorrect.

To prevent such problems, use the ASCII conversion option. With this option, SAP Sybase IQ provides several ways to specify the fixed or variable width of an input column. Your input data can contain fixed-width input columns with a specific size in bytes, variable width input columns with column delimiters, and variable width input columns defined by binary prefix bytes.

Related concepts
Data from SAP Sybase IQ 12.7
Faster Date and Time Loads
ASCII Input Conversion
The DATE Option
The DATETIME Conversion Option
NULL Data Conversions
Related reference
Load Conversion Options