Bulk Copy (Level 2)

SQL Server Setup Help

SQL Server Setup Help
Bulk Copy (Level 2)
SQL Server 6.x SQL Server 2000
The bcp utility (using DB-Library) could import datetime or smalldatetime values in character-mode data files using:
  • The default format used by DB-Library (mmm dd yyy hh:mmXX where XX is either A.M. or P.M.).

  • Any format supported by dbconvert except the ODBC format.

bcp exported character-mode data files with datetime and smalldatetime values by using the default DB-Library format.

The bcp utility (which uses ODBC) can import datetime and smalldatetime values in character-mode data files using:
  • The default format used by DB-Library.

  • The format used by ODBC (yyyy-mm-dd hh:mm:ss[.f...]).

However, bcp does not use other formats supported by dbconvert.

bcp exports datetime and smalldatetime values using the ODBC default format.

Expect different results as compared to earlier versions of SQL Server. To bulk copy data in character mode between SQL Server 6.x and SQL Server 2000 servers, use the same bcp version (either SQL Server 6.x or SQL Server 2000) for both importing and exporting data.

To export data from a SQL Server 2000 server into a character-mode data file and later import that data using a DB-Library bulk copy application, use the SQL Server 6.x version of bcp.

For existing datetime or smalldatetime values in a character-mode data file in a format other than the DB-Library default:

  • Change the values to the DB-Library default format for continued use with SQL Server 6.x and SQL Server 2000 bcp.

  • Change the values to the ODBC format for use with SQL Server 2000 bcp.

bcp exported money values in character mode data files using digit grouping symbols (for example, the comma in the United States when using the U.S. version of SQL Server, the US version of Microsoft Windows NT, and US settings) and two digits after the decimal point. bcp exports money values in character mode data files without digit grouping symbols, but with four digits after the decimal point.

Expect different results as compared to earlier versions of SQL Server.

To read character files created by version 6.x DB-Library bcp in SQL Server 2000, use the -V switch. For more information, see bcp Utility.