First Commit - Source Code from Reply
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
set serveroutput on size 1000000
|
||||
DECLARE
|
||||
v_anno number;
|
||||
BEGIN
|
||||
for r_tab_part in
|
||||
(select table_name from user_tables where partitioned = 'YES')
|
||||
loop
|
||||
begin
|
||||
v_anno := to_char(sysdate,'yyyy') + 1;
|
||||
MNP.CREA_PARTIZIONE(to_date('01/04/'||v_anno,'dd/mm/yyyy'),r_tab_part.table_name, '&1');
|
||||
MNP.CREA_PARTIZIONE(to_date('01/07/'||v_anno,'dd/mm/yyyy'),r_tab_part.table_name, '&1');
|
||||
MNP.CREA_PARTIZIONE(to_date('01/10/'||v_anno,'dd/mm/yyyy'),r_tab_part.table_name, '&1');
|
||||
MNP.CREA_PARTIZIONE(to_date('01/01/'||(v_anno+1),'dd/mm/yyyy'),r_tab_part.table_name, '&1');
|
||||
exception when others then
|
||||
dbms_output.put_line('errore di creazione delle partizioni per la tabella '||r_tab_part.table_name||SQLERRM);
|
||||
end;
|
||||
|
||||
end loop;
|
||||
|
||||
END;
|
||||
/
|
||||
exit;
|
||||
Reference in New Issue
Block a user