Consider the following scenario. You install Microsoft SQL Server 2005 Service Pack 2 (SP2). You run a query that references a view. In this scenario, you receive the following error messages.
Error message 1
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
Error message 2
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
Additionally, the following error messages are logged in the SQL Server 2005 Errorlog file.
Error message 1
Date Time Server Error: 17310, Severity: 20, State: 1.
Error message 2
Date Time Server A user request from the session with SPID 51 generated a fatal exception.
This problem occurs if the following conditions are true:
- The query references a view that uses non-ANSI outer join operators. For example, the view uses the *= operator or the =* operator.
- The column list of the SELECT statement in the view contains a subquery.
- The version of SQL Server 2005 is SQL Server 2005 SP2 or a later version.
- You set the database of SQL Server 2005 to use compatibility level 80.