FIX: You may experience some loss of data when you use an UPDATE statement with a SET clause that uses the time, datetime2 and datetimeoffset types in SQL Server 2008

Article translations Article translations
Article ID: 2216474 - View products that this article applies to.
Expand all | Collapse all

On This Page


Consider the following scenario:
  • You run an UPDATE statement that uses a SET clause in an SQL query on a server that is running Microsoft SQL Server 2008.
  • The SET clause uses the form @variable = column = expression.
  • The type of the variable and of the column is datetime2, datetimeoffset, time.

In this scenario, you may experience some loss of data.


Service pack information

To resolve this problem, obtain the latest service pack for SQL Server 2008. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
968382 How to obtain the latest service pack for SQL Server 2008


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

This problem was first corrected in SQL Server 2008 Service Pack 2 for SQL Server 2008.


For more information about the time, datetime2 and datetimeoffset data types, see the following topic on the Microsoft TechNet website:
Using XML with time, date, datetime2, and datetimeoffset Data Types


Article ID: 2216474 - Last Review: July 8, 2010 - Revision: 2.0
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Standard
kbinfo kbexpertiseinter kbprb kbbug kbtshoot kbsurveynew KB2216474

Give Feedback


Contact us for more help

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