I am joining couple of Oracle tables on 2 separate fields. If first join fails, then I join on a second field. I am using left joins However when doing the second join, I am getting a lot more records, most likely because there are multiple values found in table 2
Any suggestions how I can remove duplicates on the 2 joins I am doing.
Thanks
select v.* from
(select
t.*
from
(select x.* from table1 x
MINUS
select x.* from table1 x
join table2 u
on x.postcode = u.postcodelocator) t) v
left join from table2 w
on v.AL1_POST_TOWN_NAME = w.TOWNNAME