FIX: INT Divide by Zero Exception Error When Running a Query

Last reviewed: June 27, 1997
Article ID: Q165754
The information in this article applies to:
  • Microsoft SQL Server, version 6.5 Service Pack 2
BUG #: 16455 (Windows NT: 6.5)

SYMPTOMS

An INT divide by zero exception error occurs when you run a query joining tables with wide rows. The scenario that reproduced this bug was a select with a join between a very wide table (2,698 bytes row length) and a view with one where clause. The handled exception error stops the query.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5 Service Pack 2. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.

MORE INFORMATION

The following query caused the access violation:

   select   pr.*,p.*
   from  tblprospects pr, tblprospectsdetail p
   where pr.prospect_key=(select min(p2.prospect_key) from tblprospects p2)
      and pr.prospect_key=p.prospect_key

You can usually avoid the exception error by reducing the select list or the where conditions.


Additional query words: AV GPF
Keywords : SSrvTran_SQL kbbug6.50
Version : 6.5 SP2
Platform : WINDOWS
Issue type : kbbug
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.