Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/171868

From BetaArchive Wiki
Knowledge Base

FIX: Access Violation in a UNION Operation on a View with a NOT

Article ID: 171868

Article Last Modified on 10/3/2003


  • Microsoft SQL Server 6.5 Standard Edition
  • Microsoft SQL Server 6.5 Service Pack 1

This article was previously published under Q171868


BUG #: 16071 (NT: 6.5)

A view that involves a UNION of two simple SELECT operations may cause an access violation (AV) when selected from, if one of the operands involves a SELECT with a NOT IN condition, as shown below:

   select x from tbl1
   select x from tbl2 where x not in (select x from tbl1)


To work around this problem, avoid using NOT IN with a subquery.


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

Additional query words: gpf 6.5.201 sp sp1

Keywords: kbbug kbfix kbusage KB171868