-- temptable column FN, LN
insert into temptable (dsc.fn, dsc.ln, est.fn, etc.ln, dsc.id, ets.id)
select dsc.FN, DSC.LN, DCS.PersonID , ETS.FN, ETS.LN, ETS.PErsonID
from dsc, est
where ltrim(rtim(upper(replace(dsc.fn)))) = ltrim(rtim(upper(ets.fn)))
and ltrim(rtim(upper(replace(dsc.ln)))) = ltrim(rtim(upper(ets.ln)))
and ltrim(rtim(upper(replace(dsc.mn)))) = ltrim(rtim(upper(ets.mn)))
and dsc.dob = ets.dob
and ALL THE OTHER CONDITIONS
insert into temptable (dsc.fn, dsc.ln, est.fn, etc.ln, dsc.id, ets.id)
select dsc.FN, DSC.LN, DCS.PersonID , ETS.FN, ETS.LN, ETS.PErsonID
from dsc, est
where ltrim(rtim(upper(replace(dsc.fn)))) = ltrim(rtim(upper(ets.fn)))
and ltrim(rtim(upper(replace(dsc.ln)))) = ltrim(rtim(upper(ets.ln)))
and ltrim(rtim(upper(replace(dsc.mn)))) = ltrim(rtim(upper(ets.mn)))
and dsc.dob = ets.dob
and ALL THE OTHER CONDITIONS
No comments:
Post a Comment