dbTalk Databases Forums  

add a new range partition in a existing table

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss add a new range partition in a existing table in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sansar
 
Posts: n/a

Default add a new range partition in a existing table - 10-17-2007 , 08:46 AM






Hallo !
My PL/SQL -Script send me a Error-Message.
I don't know how i find the error.
i want add a new range partition in a existing table ?



declare
v_date date;
v_part varchar2(20);

CURSOR context_date_cur IS
Select distinct ext_frontend.context_date
from ext_frontend;


begin
-- Test statements here
IF NOT context_date_cur%ISOPEN
THEN
OPEN context_date_cur;
END IF;

LOOP

FETCH context_date_cur into v_date;
exit when context_date_cur%NOTFOUND;
DBMS_OUTPUT.put_line(to_char(v_date));
v_part :='part_'||(to_char(v_date));
DBMS_OUTPUT.put_line(v_part);
execute immediate 'alter table LOG_ANALYSE.FRONTEND_TAB
add partition v_part
values less than 1+to_date(v_date, DD.MM.YYYY); ';

end loop;
CLOSE context_date_cur;

end;


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.