BUG: Access Violation When Using ANSI JOIN on a Table with View

Last reviewed: July 8, 1997
Article ID: Q170224
The information in this article applies to:
  • Microsoft SQL Server, versions 6.5
BUG #: 16994

SYMPTOMS

An ANSI JOIN of a table with a view that was generated without a base table may result in an access violation (AV). The following script demonstrates this problem:

   SELECT c = 0 INTO t
   GO

   CREATE VIEW v AS SELECT c = 0
   GO

   SELECT t.c, v.c
      FROM t JOIN v ON t.c = v.c
   GO

The following error message may be observed in the server error log, while "DB-Library Process Dead - Connection Broken" is observed in the client side.

   EXCEPTION_ACCESS_VIOLATION raised, attempting to create symptom dump
   Initializing symptom dump and stack dump facilities

This error message is followed by stack trace information.

WORKAROUND

To work around this problem, try to avoid using an ANSI JOIN. For example, the following script demonstrates the workaround for the above scenario:

   SELECT t.c, v.c
      FROM t, v
      WHERE t.c = v.c
   GO

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Keywords : kbbug6.50 kbusage SSrvGen SSrvGPF
Version : 6.5
Platform : WINDOWS
Issue type : kbbug
Resolution Type : kbworkaround


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: July 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.