I'm writing a query joining multiple tables - I'm doing a left join on the last table that I join because there's data in the other files that I want even if this last table doesn't contain a match. When I add a where clause to the query I don't get results where the last table has a null value. It's like the query changes to an inner join. See below for the query. Is there anyway around this on the iseries?
select a.smrn10, c.acctno,d.sma230, d.sma232, c.trancd, c.trncat, e.closcd, c.status, c.batch, c.backdt, e.cashdt
from gator.gtsrvdsr as a
join gator.gtsrvbal as d on d.blloan=a.smrn10 and d.sma232 <> 0
join conver_bom.aqpcvtno as b on b.rlacct=a.smrn10
join conver_bom.clpacmst as e on e.acctno=b.acctno
left join conver_bom.pypsusp as c on c.acctno=b.acctno and c.trancd = '110'
where c.backdt <> e.cashdt;
October 24, 2005 2:59 PM
October 25, 2005 7:45 AM