FIX: ANSI Style Outer Join Can Fail w/ Error #301Last reviewed: April 8, 1997Article ID: Q151513 |
The information in this article applies to:
SYMPTOMSUsing an ANSI style outer join can cause Msg 301, Level 16, State 1:
Query contains an illegal outer-join request. CAUSEYou will get the error if the following conditions match:
WORKAROUNDDisable 'join-order heuristic' with trace flag 320.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.
MORE INFORMATIONSQL Server uses 'join-order heuristic' method to reduce the number of permutations in searching for the best join order, in the case with ANSI style outer join (i.e. LEFT OUTER JOIN, RIGHT OUTER JOIN, etc), one of the program variables is not set properly, hence if the above two conditions match, 'join-order heuristic' will fail every possible permutation and end up with Msg #301. With trace flag 310 turned on, you can observe every permutation is followed by 'IGNORING THIS PERMUTATION.'
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |