BUG: Subquery in IN Clause with DISTINCT and JOINs May Cause Access Violation

ID: Q246893


The information in this article applies to:
  • Microsoft SQL Server version 7.0

BUG #: 56495 (SQLBUG_70)

SYMPTOMS

A SELECT statement causes a handled access violation (AV) exception error if all of the following conditions are true:

  • The SELECT statement contains a WHERE column IN( ) clause.


  • The IN clause contains an uncorrelated subquery.


  • The subquery uses SELECT DISTINCT.


  • The subquery contains at least two INNER JOINs.


  • The subquery contains several restrictions in the WHERE clause.



WORKAROUND

To work around this problem, replace the IN clause with an EXISTS clause, thereby correlating the subquery to the main query.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words: sqb-query gpf gp general protection fault av

Keywords : SSrvGPF SSrvTran_SQL kbbug7.00 kbSQLServ700bug
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


Last Reviewed: November 25, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.