Article ID: 232926 - Last Review: March 14, 2006 - Revision: 2.0 FIX: Complex Query Containing Redundant Logic May Cause Access ViolationThis article was previously published under Q232926
BUG #: 54578 (SQLBUG_70)
SYMPTOMS
A 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.
WORKAROUND
To work around this problem, avoid using logical redundancy in complex SQL queries.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 254561
(http://support.microsoft.com/kb/254561/
)
INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0 For more information, contact your primary support provider.
MORE INFORMATION
For example, the following query can be said to contain logically redundant code:
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.
| Article Translations
|
Back to the top
