Explanation
The indicated column reference in an ON clause refers to a column in a table that may be accessed after the join of the ON clause. Column references in predicates of the ON clause must refer to the tables in the ON clause or tables that must to be accessed before the join of the ON clause due to the order of the INNER or LEFT joins. Tables in the FROM list separated by commas may be joined in a different order than written to provide the lowest possible cost of execution. Below are examples of queries that will get the -316 SQL code:
Example 1: Join order may change such that T1 is read after the join of T3 and T4.
select count(*)
from sql_status T1, sql_status T2,
(sql_status T3 left join sql_status T4
on T1.urts = 1)
;
Example 2: T4 has not been read before the join of T1 and T2.
select count(*)
from (sql_status T1 left join sql_status T2 on T4.urts = 1)
left join
(sql_status T3 left join sql_status T4)
;
User Response
Correct the column reference as needed.
|
Copyright © 2014 CA.
All rights reserved.
|
|