The information in this article applies to:
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. 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. WORKAROUNDPad 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. MORE INFORMATIONSuppose you have the following file: And you want to load it into the following table:
If you set up a DTS import task to use fixed-length (not delimited) fields and indicate that you want to skip the first line (the one that reads "header"), since the first line is not the same length as the other three, DTS does not recognize it as a complete row of information and reads enough of the second line to meet the maximum row-length requirement. As a result, DTS skips the first two lines ("header" and "Smith, David") and will only load the last two lines. You end up with two records in your table: "Brown, Julie" and "Jones, Paula".If you do not indicate that the first line is to be skipped, DTS tries to complete the first line with data from the second line and the following rows are not loaded correctly. If the first line is padded with spaces so that it is the same length as the remaining lines, then it will be skipped correctly and three rows will be imported. The first row will also be skipped correctly if you are using a delimited-field file instead of fixed-length field file. Additional query words: ignore export wizard package
Keywords : kbSQLServ700 |
Last Reviewed: December 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |