The information in this article applies to:
BUG #: 54578 (SQLBUG_70) SYMPTOMSA complex query that includes logically redundant code may cause a handled access violation (AV) when the Query Optimizer attempts to remove the unnecessary logic at compile time. RESOLUTIONA supported fix that corrects this problem is now available from Microsoft, but
it has not been fully regression tested and should be applied only to systems
experiencing this specific problem. If you are not severely affected by this
specific problem, Microsoft recommends that you wait for the next SQL Server service pack
that contains this fix. http://www.microsoft.com/support/supportnet/overview/overview.aspThe English version of this fix should have the following file attributes or later: NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.WORKAROUNDTo work around this problem, avoid using logical redundancy in complex SQL queries. STATUSMicrosoft has confirmed this to be a problem in SQL Server version 7.0. MORE INFORMATIONFor example, the following query can be said to contain logically redundant code:
The outer ISNULL() function is unnecessary because the nested ISNULL() will never return NULL. In fact, neither ISNULL() function is necessary because the qty column of the sales table does not permit NULL values.
The Query Optimizer in SQL Server 7.0 attempts to make queries more efficient by eliminating unnecessary logic like that shown above (a technique referred to as "Folding"). It is during this phase of optimization with a highly complex query that SQL Server may encounter the AV described in this article. Additional query words:
Keywords : SSrvGPF kbbug7.00 |
Last Reviewed: December 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |