Select distinct expr.fac_id, fxf.fac_id, expr.cust_nbr, fxf.cust_nbr
from business_alignment expr left outer join business_alignment fxf, UI_RESULTS_DB.adamfxf
on expr.fac_id = fxf.fac_id
and date between fxf.eff_dt and fxf.exp_dt
and fxf.company_cd = 'FDFR'
where
date between expr.eff_dt and expr.exp_dt
and expr.company_cd = 'FX'
and fxf.cust_nbr = UI_RESULTS_DB.adamfxf.acc
|