declare
cursor get_values is select histdate from mfg_tbl_fab_indices where to_date(histdate,'yyyy-mm-dd')>=to_date('2008-09-01','yyyy-mm-dd');
temp number;
begin
for tt in get_values loop
select scrap into temp from fab2_rpt_mfg_fab_yield@rptprd
where yield_date=to_date(tt.histdate,'yyyy-mm-dd');
update mfg_tbl_fab_indices set scrap = temp
where histdate = tt.histdate;
end loop;
commit;
end;上面的语句运行出错,错误提示是 no data found,谁知道怎么回事啊?谢谢
cursor get_values is select histdate from mfg_tbl_fab_indices where to_date(histdate,'yyyy-mm-dd')>=to_date('2008-09-01','yyyy-mm-dd');
temp number;
begin
for tt in get_values loop
select scrap into temp from fab2_rpt_mfg_fab_yield@rptprd
where yield_date=to_date(tt.histdate,'yyyy-mm-dd');
update mfg_tbl_fab_indices set scrap = temp
where histdate = tt.histdate;
end loop;
commit;
end;上面的语句运行出错,错误提示是 no data found,谁知道怎么回事啊?谢谢
thank you for your help,I found that one record is not exist in the table fab2_rpt_mfg_fab_yield but in the table mfg_tbl_fab_indices。