create or replace procedure CREATESPLITETABLE(tableNums in number) is
cursor t_cursor is
select substr(table_name, 1, length(table_name)-1) new_table_name, table_name from tabs
where table_name like '%1' and table_name not like '%11';
c_row t_cursor % rowtype;
i number;
begin
for c_row in t_cursor loop
begin
i :=1;
loop
i :=i+1;
if i > tableNums then
exit;
end if;
COPYTABLE(c_row.table_name, c_row.new_table_name||i, i);
end loop;
end;
end loop;
end CREATESPLITETABLE;