FIX: Datetime Column Defaults Load Incorrectly During BULK INSERT

Article translations Article translations
Article ID: 275622 - View products that this article applies to.
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)
Expand all | Collapse all

Symptoms

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.

Workaround

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.

Status

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.

Properties

Article ID: 275622 - Last Review: November 2, 2013 - Revision: 3.0
Applies to
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB275622

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com