Data Formats for Importing or Exporting Data

This section looks at the requirements for formatting data files and at how to interactively specify the format of data fields when exporting data by using the bcp utility.

For information about Microsoft SQL Server data types, see Data Types (Transact-SQL).

Note

The bcp command, the BULK INSERT statement, and INSERT ... SELECT * FROM OPENROWSET(BULK...) statement all support the use of a specialized file known as a format file to store format information for each field in a data file. The format file can be used to provide all the format information required to bulk export data from and bulk import data to an instance of SQL Server. For more information, see Format Files for Importing or Exporting Data.

The following table describes the topics in this section.

Topic Description

Preparing Data for Bulk Export or Import

Contains requirements and considerations for a bulk-export or bulk-import operation.

Using Native, Character, or Unicode Formats

Contains information about how to work with data formats when bulk exporting or importing data.

Specifying Data Formats for Compatibility by Using bcp

Contains information about how to describe data formats when you export data that is to be imported into another program, such as another database program.

Keeping Nulls or Using Default Values During Bulk Import

Contains guidelines for controlling whether a bulk import operation uses any default definitions specified in a destination table or keeps any NULL values that are encountered in the data file.

Keeping Nulls or Using Default Values During Bulk Import

Contains guidelines for controlling whether a bulk import operation keeps any identity values that are encountered in the data file.

Bulk Importing Large-Object Data

Contains information about bulk importing image data.

See Also

Concepts

Basic Guidelines for Bulk Importing Data

Other Resources

bcp Utility
BULK INSERT (Transact-SQL)
Bulk Copy Functions
BulkCopy Object
INSERT (Transact-SQL)
OPENROWSET (Transact-SQL)
Performing Bulk Copy Operations (ODBC)
Table Hint (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance