create or replace procedure V8_UPD_GLOBALUSERLOGRIGHTS is
  cursor OOO is
    select distinct wusr_wegr_id from wusr where wusr_wegr_id is not null and wusr_name not like 'Miscellaneous{mainmiscellaneous}Global User Log';
  cooo OOO%rowtype;

begin

delete from wusr where WUSR_NAME like 'Miscellaneous{mainmiscellaneous}Global User Log';

  for cooo in ooo loop
    insert into wusr values (seq_wusr.nextval, null, cooo.wusr_wegr_id, 'Miscellaneous{mainmiscellaneous}Global User Log', 1); 
  end loop;

  exception
    when no_data_found then
      raise; --null;
    when others then
      raise; --null;  
end V8_UPD_GLOBALUSERLOGRIGHTS;
/
