File Data Types

bcp can handle data in one of three forms: character (ASCII), native, or Unicode. You have the choice of which character format is used, depending on the source or destination of the data file:

• The character format (–c) is the most commonly used of the three data types because it reads or writes using ASCII characters and carries out the appropriate data type conversion for the SQL Server representations. The CHAR data type is the default storage type; it uses tabs as field separators and the newline character as the row terminator.

• The native format (–n) is used for copying data between servers. This format allows bcp to read and write using the same data types used by server, which results in a performance gain. This format ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.