You are currently offline, waiting for your internet to reconnect

FIX: You may receive different date values for each row when you use the getdate function within a case statement in SQL Server 2005

Extended support for SQL Server 2005 ended on April 12, 2016

If you are still running SQL Server 2005, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

This article has been archived. It is offered "as is" and will no longer be updated.
Bug: #50000210 (SQL Hotfix)
Microsoft distributes Microsoft SQL Server 2005 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release.
SUMMARY
This article describes the following about this hotfix release:
  • The issues that are fixed by this hotfix package
  • The prerequisites for applying the hotfix package
  • Information whether you must restart the computer after you apply the hotfix package
  • Information whether the hotfix package is replaced by any other hotfix package
  • Information whether you must make any registry changes after you apply the hotfix package
  • The files that are contained in the hotfix package
SYMPTOMS
When you use the getdate function in a select query in Microsoft SQL Server 2005, you may receive different date values for each row. You experience this problem when you use the getdate function within a case statement.

Note You may not experience this problem in Microsoft SQL Server 2000.
RESOLUTION
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.You must have

Prerequisites

You must have Microsoft SQL Server 2005 Service Pack 1 (SP1) installed to apply this hotfix.

For more information about how to obtain SQL Server 2005 Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:
913089 How to obtain the latest service pack for SQL Server 2005

Restart information

You do not have to restart the computer after you apply this hotfix.

Registry information

You do not have to change the registry.

Hotfix file information

This hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain of all the files that you must have to fully update a product to the latest build.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
SQL Server 2005, 32-bit x86 versions
File nameFile versionFile sizeDateTimePlatform
logread.exe2005.90.2189.0398,11207-Sep-200622:14x86
microsoft.analysisservices.adomdclient.dll9.0.2189.0543,52007-Sep-200622:14x86
microsoft.analysisservices.deploymentengine.dll9.0.2189.0138,01607-Sep-200622:14x86
microsoft.analysisservices.dll9.0.2189.01,215,26407-Sep-200622:14x86
microsoft.sqlserver.mgdsqldumper.dll2005.90.2189.075,55207-Sep-200622:12x86
microsoft.sqlserver.sqlenum.dll9.0.2189.0908,06407-Sep-200622:14x86
msgprox.dll2005.90.2189.0197,92007-Sep-200622:12x86
msmdlocal.dll9.0.2189.015,610,14407-Sep-200622:14x86
msmdredir.dll9.0.2189.03,990,30407-Sep-200622:15x86
replprov.dll2005.90.2189.0547,61607-Sep-200622:14x86
replrec.dll2005.90.2189.0782,11207-Sep-200622:14x86
sqlaccess.dll2005.90.2189.0347,93607-Sep-200622:14x86
sqlagent90.exe2005.90.2189.0319,26407-Sep-200622:13x86
sqlservr.exe2005.90.2189.028,962,13607-Sep-200622:14x86
xpstar90.dll2005.90.2189.0292,64007-Sep-200622:17x86
xpstar90.rll2005.90.2189.0152,86407-Sep-200622:14x86
SQL Server 2005, 64-bit version
File nameFile versionFile sizeDateTimePlatform
logread.exe2005.90.2189.0522,52808-Sep-200603:51x64
microsoft.analysisservices.adomdclient.dll9.0.2189.0543,52007-Sep-200622:14x86
microsoft.analysisservices.adomdclient.dll9.0.2189.0543,52008-Sep-200603:51x86
microsoft.analysisservices.deploymentengine.dll9.0.2189.0138,01607-Sep-200622:14x86
microsoft.analysisservices.dll9.0.2189.01,215,26407-Sep-200622:14x86
microsoft.sqlserver.mgdsqldumper.dll2005.90.2189.075,55207-Sep-200622:12x86
microsoft.sqlserver.mgdsqldumper.dll2005.90.2189.091,42408-Sep-200603:48x64
microsoft.sqlserver.sqlenum.dll9.0.2189.0875,29608-Sep-200603:48x86
msgprox.dll2005.90.2189.0259,36008-Sep-200603:50x64
msmdlocal.dll9.0.2189.015,610,14407-Sep-200622:14x86
msmdredir.dll9.0.2189.03,990,30407-Sep-200622:15x86
replprov.dll2005.90.2189.0745,24808-Sep-200603:48x64
replrec.dll2005.90.2189.01,008,41608-Sep-200603:48x64
sqlaccess.dll2005.90.2189.0355,10408-Sep-200603:51x86
sqlagent90.exe2005.90.2189.0390,94408-Sep-200603:51x64
sqlservr.exe2005.90.2189.039,323,42408-Sep-200603:48x64
xpstar90.dll2005.90.2189.0540,96008-Sep-200603:51x64
xpstar90.rll2005.90.2189.0153,37608-Sep-200603:49x64
SQL Server 2005, Itanium architecture version
File nameFile versionFile sizeDateTimePlatform
logread.exe2005.90.2189.01,095,45608-Sep-200602:51IA-64
microsoft.analysisservices.adomdclient.dll9.0.2189.0543,52007-Sep-200622:14x86
microsoft.analysisservices.adomdclient.dll9.0.2189.0543,52008-Sep-200602:50x86
microsoft.analysisservices.deploymentengine.dll9.0.2189.0138,01607-Sep-200622:14x86
microsoft.analysisservices.dll9.0.2189.01,215,26407-Sep-200622:14x86
microsoft.sqlserver.mgdsqldumper.dll2005.90.2189.075,55207-Sep-200622:12x86
microsoft.sqlserver.mgdsqldumper.dll2005.90.2189.0163,10408-Sep-200602:49IA-64
microsoft.sqlserver.sqlenum.dll9.0.2189.0875,29608-Sep-200602:51x86
msgprox.dll2005.90.2189.0542,49608-Sep-200602:50IA-64
msmdlocal.dll9.0.2189.048,587,04008-Sep-200602:49IA-64
msmdredir.dll9.0.2189.06,237,47208-Sep-200602:52IA-64
replprov.dll2005.90.2189.01,617,18408-Sep-200602:51IA-64
replrec.dll2005.90.2189.02,141,47208-Sep-200602:51IA-64
sqlaccess.dll2005.90.2189.0349,47208-Sep-200602:50x86
sqlagent90.exe2005.90.2189.01,143,58408-Sep-200602:51IA-64
sqlservr.exe2005.90.2189.072,232,22408-Sep-200602:50IA-64
xpstar90.dll2005.90.2189.0951,07208-Sep-200602:53IA-64
xpstar90.rll2005.90.2189.0152,35208-Sep-200602:49IA-64
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
MORE INFORMATION
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Steps to reproduce the problem

Run the following code example in SQL Server 2005.
Use <Database>godrop table temp_tablegocreate table temp_table (a int, b char(100), c char(1))goset nocount ongodeclare @ret intset @ret = 0while (@ret < 10000)begin      set @ret = @ret + 1      insert into temp_table values(@ret,@ret,'A')      insert into temp_table values(@ret*2,@ret*2,'B')      insert into temp_table values(@ret*3,@ret*3,'C')      insert into temp_table values(@ret*4,@ret*4,'D')endgoselect case      when c = 'A'            then getdate()      when c = 'B'            then getdate()      when c = 'D'             then getdate()      end as Status,getdate(),a,b,cfrom temp_table order by A
Note Replace <Database> with the database name.
Properties

Article ID: 925153 - Last Review: 12/09/2015 07:08:04 - Revision: 2.0

Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems, Microsoft SQL Server 2005 Enterprise X64 Edition, Microsoft SQL Server 2005 Standard X64 Edition, Microsoft SQL Server 2005 Workgroup Edition, Microsoft SQL Server 2005 Standard Edition

  • kbnosurvey kbarchive kbautohotfix kbsql2005tsql kbexpertiseadvanced kbhotfixserver kbqfe KB925153
Feedback