You are currently offline, waiting for your internet to reconnect

FIX: Datetime Column Defaults Load Incorrectly During BULK INSERT

This article was previously published under Q275622
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57727 (SQLBUG_70)
If a datetime column, which has a default value defined, has no incoming value during a BULK INSERT operation, the default value is inserted in the column. The column for that row may then have an incorrect value because the value inserted may not be the default value defined for that column.
To work around this problem, use any of these methods:
  • Use Data Transformation Services (DTS), Bulk-copy (BCP), or a distributed query to load the data file.

  • Remove the default constraint before you use the BULK INSERT and then add the default constraint back after the statement finishes.

    WARNING: This method may allow other processes that access the table to insert rows with no default value for the duration of the process.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
bulk copy wrong result bad data incorrect results

Article ID: 275622 - Last Review: 11/02/2013 01:06:00 - Revision: 3.0

Microsoft SQL Server 7.0 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix KB275622