declare
   nopjt number;
   currpjt number;
   charset varchar2(30);

begin
   select value$ into charset from sys.props$ where name='NLS_CHARACTERSET';
   select count(project_name) into nopjt from nx_projects where
       origin='B';
   select pjt_seq into currpjt from nx_pjt_seq for update nowait;
   update nx_pjt_seq set pjt_seq = currpjt + nopjt;
   commit;

   insert into nx_project select currpjt+rownum-1, project_name, language_code,
       character_set, NULL from nx_projects where origin='B';
   commit;
end;
/

