FIX: SELECT MAX May Cause Access Vio. That Terminates Client
  
PSS ID Number: Q120720
Article last modified on 12-13-1994
 
4.20
 
WINDOWS
 

----------------------------------------------------------------------
The information in this article applies to:
 
  - Microsoft SQL Server version 4.2
----------------------------------------------------------------------
 
BUG# NT: 796 (4.2)
 
SYMPTOMS
========
 
Using the aggregate function MAX on a table may cause an access
violation that terminates the client process.
 
The condition for this problem to happen is not easy to predict. It is
caused by the optimizer trying to optimize the MAX aggregate using the
index with id 0.
 
This problem does not happen with any other aggregate function or on a
table with a clustered index.
 
WORKAROUND
==========
 
The problem has been fixed in Microsoft SQL Server version 4.21a.
 
If an immediate upgrade is not applicable, you can sometimes work around
the problem by changing the table name or creating a clustered index on the
table.
 
STATUS
======
 
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 4.2. This problem was corrected in SQL Server version 4.21a. For
more information, contact your primary support provider.
 
Additional reference words: 4.20 4.21 Windows NT
KBCategory: kbother kberrmsg
KBSubcategory: SSrvWinNT
 
=============================================================================
 
Copyright Microsoft Corporation 1994.
