BUG: Corrrelated Subquery with WHERE, GROUP BY, and HAVING Clauses May Raise Error 803
ID: Q198161
|
The information in this article applies to:
-
Microsoft SQL Server version 6.5
BUG #: 18139 (SQLBUG_65)
SYMPTOMS
When using a correlated subquery that contains a GROUP BY, a HAVING, and a
WHERE clause, the query may result in error 803.
The following conditions must be met to raise error 803:
- The column used in the outer query must appear in the WHERE clause of
the subquery.
- The GROUP BY statement must include a second column from the table used
in the outer query.
- The second column must also appear in the HAVING clause.
- Both the WHERE and the HAVING clause must evaluate to true.
The following is error 803:
Msg 803, Level 20, State 2
Unable to place buffer 0x0 holding logical page 1336 in sdes for object
'tbl1' - either there is no room in sdes or buffer already in requested
slot.
The SQL Server is terminating this process.
DB-Library: Possible network error: Write to SQL Server Failed.
Net-Library error 232: ConnectionWrite (GetOverLappedResult()).
DB-Library Process Dead - Connection Broken
WORKAROUND
To work around this problem, try one of the following:
- Break the query into two separate queries.
-or-
- Place the subquery results into a temporary table.
-or-
- Use trace flag 328 to force suquery unnesting.
STATUS
Microsoft has confirmed this to be a problem in SQL Server version 6.5.
MORE INFORMATION
This problem does not occur on SQL Server 7.0.
Additional query words:
err message
Keywords : SSrvTran_SQL kbbug6.50
Version : WINNT:6.5
Platform : winnt
Issue type : kbbug