Hi mjl
Many thanks : your code works great.
Can I ask another question ?
If table t3 has more than one field to be updated from t1,
then I can enhance the 1st part as follows :
Code:
select t1.job_no, t1.status, t1.f2, t1.f3
from t1, t2, t3
where t1.job_no = t2.job_no
and t2.job_no = t3.job_no
and (more conditions)
into temp ttemp;
But how would the update command look ?
Code:
update t3
set t3.status = (select ttemp.status from ttemp
where ttemp.job_no = t3.job_no)
set t3.f2 = (select ttemp.f2 from ttemp
where ttemp.job_no = t3.job_no)
set t3.f3 = (select ttemp.f3 from ttemp
where ttemp.job_no = t3.job_no)
where t3.jobno in (select ttemp.job_no from ttemp);
doesn't seem to work.
many thanks again.