Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Query Processor Errors [Table of Contents] Error 311

Troubleshooting and Error Messages Guide

[-] Chapter 3 Error Message Writeups
[-] Query Processor Errors
[-] Error 301

Error 301

Severity

16

Error message text

Query contains an illegal outer-join request.

Explanation

Error 301 is raised in the following scenario:

For example:

select t2.b1,
   (select t2.b2 from t1 where t2.b1 *= t1.a1)
from t2

Column t2.b1 is an outer join operand. This violates Transact-SQL query semantics, since correlated variables are not allowed to participate in an outer join.

Some ASE versions report Error 11013 ("

Correlated columns are not allowed in the outer join clause of the subquery.
") or Error 11055 ("
Query contains an illegal outer-join request.
") instead.

Action

Rewrite the query to use an ANSI outer join:

select t2.b1,
   (select t2.b2 from t2
   left outer join t1 on t2.b1 = t1.a1)
from t2

As an alternative, you can replace the outer join with an equijoin; that is, replace '*=' with '='.

Versions in which this error is raised

All versions


Query Processor Errors [Table of Contents] Error 311