Monday, June 10, 2013

CREATE OR REPLACE procedure insert_auw_into_temp() is
cursor air_cur is select distinct temp.reg_no,air.max_allup_wt from tc_temp_log temp,tc_aircraft_mt air where temp.max_allup_wt is null and trim(temp.reg_no)=trim(air.reg_no);
   v_temp air_cur%rowtype;
begin
   open air_cur;
   loop
      fetch air_cur into v_temp;
      exit when air_cur%notfound;
      update tc_temp_log set max_allup_wt=v_temp.max_allup_wt where trim(reg_no)=trim(v_temp.reg_no);
   end loop;
   close air_cur;
end;
/

No comments:

Post a Comment