Bug 4433936 Queries with FULL / LEFT OUTER join are involved with remote tables and these fail can fail with ORA-907 or ORA-933

select * from

(
select * from a@dblink a
full/left/right outer join
select * from b@dblink b
on a.col1 = b.col1
)
Error: ORA-00933: SQL command not properly ended ORA-02063: preceding line from <dblink>
單獨執行紅色的sql不會有問題, 但變成 sub-sql 時問題就出現了.

Solution
Rewrite the related queries using Oracle join operators.
倘若有這樣的需求,須改寫成Oracle提供的join寫法,
如假設上例為 right outer join,改寫成
select * from
(
select * from a@dblink a, b@dblink b
where a.col1 = b.col1(+)
)

 

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 py3939 的頭像
    py3939

    老爹寫程式

    py3939 發表在 痞客邦 留言(0) 人氣()