FIX: Outer Join on View with count() GP Faults SQLLast reviewed: May 5, 1997Article ID: Q71142 |
The information in this article applies to:
- Microsoft SQL Server version 4.2 for OS/2BUG# OS/2: 1062 (4.2)
SYMPTOMSUnder certain circumstances, executing a query that does an outer join between a table and a view can cause SQL Server to general protection fault (GP fault).
CAUSEIf the view contains a count() function and a GROUP BY clause, and the query references the column in the count() function, the server will GP fault. The following script is an example of this problem:
use pubs
go
create view pubtype
as
select pub_id, quantity=count(title)
from titles
group by pub_id
go
select T.type, P.quantity
from titles T, pubtype P
where T.pub_id *= P.pub_id
and P.pub_id = '0877'
go
< The server will GP fault >
WORKAROUNDAny of the following variations to the view/query can be used to avoid the problem:
STATUSMicrosoft has confirmed this to be a problem in SQL Server version 4.2 for OS/2. This problem has been corrected in version 4.2a. For more information, please contact your primary support provider.
|
Additional query words: outer join group by Transact-SQL
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |