Microsoft KB Archive/271247

= PRB: DTS Wizard &quot;Fixed Field Column Positions&quot; Wraps Text =

Article ID: 271247

Article Last Modified on 10/23/2000

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q271247



SYMPTOMS
When you use the Data Transformation Services (DTS) Wizard and you import a text file, misleading information appears in the Preview pane for the Fixed Field Column Positions screen or page. If a row in the text file is longer than the fixed length, the left over characters wrap in the Preview pane, which implies improper results.



MORE INFORMATION
Consider a text file that contains the following: Data1 Data2 Data1 DataXXX Data1 DataYYY Perform these steps:  Open the DTS Wizard. Select Text File as the import source, and then point the Wizard to the saved text file. Select the Fixed Field option button. Accept the other defaults. Press Next.  In the Fixed Field Column Positions dialog box, note that the text is wrapped as follows: <pre class="fixed_text">Data1 Data2 Data1 DataX XXData1 Dat aYYY </li> Place a column break on position 5 (for illustration purposes).</li>  Note that the data is divided by this marker as follows: <pre class="fixed_text">    | Data1| Data2 Data1| DataX XXDat|a1 Dat aYYY | | This seems to imply that after insertion, the result set may appear as follows: <pre class="fixed_text">Col001      Col002 - Data1       Data2 Data1       DataX XXDat       a1  Dat aYYY        (null) However, this is not the case. Actually, the data is read in fixed lengths until the end of the text row is reached by the row delimiter. At that point, any data that appears after the fixed length columns (set by the first row of data) is ignored. The next row in the text file does not consider these left over characters. Instead, it is read from the beginning. The result set that would be inserted is as follows: <pre class="fixed_text">Col001      Col002 - Data1       Data2 Data1       DataX Data1       DataY </li></ol>

Additional query words: data transformation services

Keywords: kbprb KB271247

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.