select *
from (select a, b, c, d
from t1
where c like 'C%'
and d like 'D'
UNION
select a, b, c, d
from t1
where c like 'C%'
and d like 'D') a1,
t2
where a1.a = t2.a(+)
and a1.b = t2.b(+)
from (select a, b, c, d
from t1
where c like 'C%'
and d like 'D'
UNION
select a, b, c, d
from t1
where c like 'C%'
and d like 'D') a1,
t2
where a1.a = t2.a(+)
and a1.b = t2.b(+)
from (select a, b, c, d
from t1
where c like 'C%'
and d like 'D'
UNION
select a, b, c, d
from t1
where c like 'C%'
and d like 'D') a1 left join
t2
on a1.a = t2.a
and a1.b = t2.b