Exporting Data to a Text File Example

As an example, the general steps required to export data from Microsoft® SQL Server™ to a text file using the DTS Export Wizard are:

  1. Choose Text File as the destination, and enter the name of the text file to which the data will be exported.
  2. Enter the table, or the results of an SQL query, to copy.
  3. Determine the format of the text file to be created, because this describes how the fields are separated from one another.
Use this To do this
Delimited Align data within the file into fields, each delimited with a terminating character. All fields must be delimited with the same terminating character.
Fixed Field Align data within the file into fields of equal width. A field within the file has the same width for all rows of data. Each field can have a different width from other fields within the same row, however.
File Type Choose ANSI or Unicode, depending on the type of data in the file.
Row Delimiter Separate one row in the file from the next with a character sequence. Choose from:

{CR}{LF} Carriage Return Line Feed
{CR} Carriage Return
{LF} Line Feed
Semicolon
Comma
Tab
Vertical Bar
<none>
You can also type in a character to use as the row delimiter.

Column Delimiter Separate one column from the next with a character. Choose from:

Semicolon
Comma
Tab
Vertical Bar
<none>
You can also type in a character to use as the column delimiter.

Text Qualifier Enclose text fields character used. Choose from:

Double Quotation mark{"}
Single Quotation mark{'}
<none>
You can also type in a character to use as the text qualifier.

First row has column names Specify that the first row in the text file has column headings rather than data.
Transform... Specify any data transformations.

  1. Perform the export.
See Also

Column Mappings

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.