I have four tables as
table map
old_ac fin_ac
07063501 3435853
12522201 1737631
14195701 2515535
table gam
fin_ac cif acid
3435853 49275 121
1737631 78254 131
2515535 84000 141
table ast
acid despatch
121 E
131 E
141 E
table phone
cif email
49275 xyz.com
78254 xyz.com
84000 xyz.com
I want to generate a report for which the query I have written is
SELECT b.cif,
a.old_ac,
a.fin_ac,
d.email,
c.despatch
from map a,
gam b,
ast c,
phone d
where a.fin_ac = b.fin_ac
and b.acid = c.acid
and d.cif = b.cif
and c.DESPATCH in ('A','B','D','E')
The result I get is
CIF OLD_AC FIN_AC EMAIL DISPATCH
10800049275 0140007063501 9080003435853 xyz.com E
10800078254 0140012522201 9080001737631 xyz.com E
10800084000 0140014195701 9080002515535 xyz.com E
Now For some of the rows in map table, FIN_AC is NULL. I want to retrieve all the rows from map even if fin_ac is NULL. I tried using LEFT OUTER JOIN but it didn't work.