PRB: DTS May Skip More Rows than Specified for Fixed-Length Files (247360)
The information in this article applies to:
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q247360 SYMPTOMS
When loading data from fixed-length fields in an ASCII file, Data Transformation Services (DTS) skips more rows than specified if the rows to be skipped are shorter than the rows you want to load.
If the rows to be skipped are longer than the data rows, then the proper number of rows will be skipped.
CAUSE
DTS expects a fixed-length file to be of fixed length, not variable length. If the first line is shorter than the maximum width of the file, DTS ignores the end-of-line markers and continues reading the next line until enough characters have been read to account for the maximum file width. All characters after this point are ignored. Therefore, DTS treats the first two lines as the line to be skipped.
If the first line is longer than the rest of the file, it will then be the longer row in the file and will be read (and skipped) properly.
WORKAROUND
Pad the rows to be skipped with spaces so that they are at least as long as the data rows to be loaded. Or use a delimiter to separate the fields instead of fixed-length fields.
Modification Type: | Major | Last Reviewed: | 2/24/2004 |
---|
Keywords: | kbpending kbprb KB247360 |
---|
|