There are four tables in the query. Table a contains a_id , a_name
The a_tl table contains a_tl_id , a_id, language_id, a_disp_name
Table b contains b_id , a_id, b_name
The b_tl table contains b_tl_id , b_id, language_id, b_disp_name
I want to make a left outer join on a and a_tl, a leftouter join on b and b_tl
and inner join in result tables. I wrote the following query
SELECT case a.a_disp_name WHEN null THEN a.a_name else a.a_disp_name end AS a_name , case b.b_disp_name WHEN null THEN b.b_name else b.b_disp_name end AS b_name , a_id , b_id FROM a , a_tl , b , b_tl WHERE a.a_id = a_tl.a_id (+) AND b.b_id = b_tl.b_id (+) AND a_tl.language_id = 2 AND b_tl.language_id = 2 AND a.a_id= b.b_id
This request works with language_id, which is present in the database, if for a certain value it is absent, it will not work, i.e. left outer join does not work.
Puneet garg
source share