CREATE OR REPLACE PROCEDURE “METER”.”COPY_ERROR_CODE_DESCRIPTION” AS

v_id varchar2(32);
v_error_code varchar(32);
v_error_desc varchar2(255);

cursor c_error is
select id from ERROR_CODE_MAPPINGS;

begin
open c_error;
loop
fetch c_error into v_id;
exit when c_error%notfound;

select error_code, error_description into v_error_code, v_error_desc from ERROR_CODE_MAPPINGS_BACKUP where id = v_id;

dbms_output.put_line(v_id ||’ :: ‘ ||v_error_code ||’ :: ‘ ||v_error_desc);
update ERROR_CODE_MAPPINGS set error_description = v_error_desc where id = v_id;

end loop;
close c_error;

end;

Advertisement