下面的查詢不會運行,因爲我有連接圖斷開連接。據我瞭解,當你爲一個表別名時,你必須先把它放在連接條件中,但是當我這樣做時,我仍然得到相同的錯誤,有什麼建議?連接圖斷開連接ORACLE
select
date1.LABEL_YYYY_MM_DD as Some_Label1,
A.Some_Field as Some_Label2,
round(sum(D.Some_Field3)/count (*),0)as Some_Label3
from Table_A A
inner JOIN Table_B B ON (A.some_key = B.some_key)
inner JOIN date_time date1 ON (A.START_DATE_TIME_KEY = date1.DATE_TIME_KEY)
left outer join Table_C C on(C.some_GUID = A.some_ID)
left outer join Table_D D on(D.a_ID = C.a_ID)
where
(1=1)
and date1.LABEL_YYYY_MM_DD ='2015-03-30'
and D.blah ='1'
group by
date1.LABEL_YYYY_MM_DD,
A.Some_Field
order by
date1.LABEL_YYYY_MM_DD
;
根據我上面的評論,我應該改變第一內連接來B.some_key = A.some_key
等等,但是我仍然得到斷開...
「連接圖斷開連接」。 。 。那是什麼意思?你的'join'沒有明顯的問題。在'on'子句中沒有關於什麼別名首先出現的規則。 – 2015-03-31 15:25:28
@GordonLinoff [鏈接](http://stackoverflow.com/questions/20242329/sql-developer-disconnected-from-the-rest-of-the-join-graph) – 2015-03-31 15:47:51