CREATE OR REPLACE procedure v8_ccm_fix_ysme_description as
  cursor ysmecursor is
  select ysme_id, ysme_description
  from ysme;
  
  rec_ysmecursor ysmecursor%ROWTYPE;
begin
  open ysmecursor;
  loop
    fetch ysmecursor into rec_ysmecursor;
    update ysme
    set ysme_description_ex=rec_ysmecursor.ysme_description 
    where ysme_id=rec_ysmecursor.ysme_id;
    exit when ysmecursor%NOTFOUND;
  end loop;  
  close ysmecursor;
  
  EXCEPTION
    when OTHERS then
      dbms_output.put_line('Exception detected');  
end;
/
