PROMPT Populate missing name on Extended Element...

DECLARE
   bug_no varchar2(9):= 'CK1238185';
   new_name varchar2(28) := '<Detected null by Migration>';
BEGIN

  update ck_migration_objects set ci_created = 'N' where ci_stage = 'CKPREMIG' and ci_name = bug_no;

  update sdd_elements@r212
  set el_name = new_name
  where el_name is null
  and exists ( select 1
		   from ciue_element_types@r212
		   where is_user_type = 'Y'
		   and short_name = el_type_of
  		 )
  and el_elem_owned_by in ( select ci_appid
	    		  	    from ck_migration_objects
				    where ci_stage = 'APPSEL' );

  update ck_migration_objects set ci_created = 'Y' where ci_stage = 'CKPREMIG' and ci_name = bug_no;
   
  commit;
  
EXCEPTION 
  when others then
     dbms_output.put_line (' ** Exception Raised ** ');
     dbms_output.put_line ('...ERROR: '||substrb(sqlerrm,1,200));
     raise;
	 
end;
/
