Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ora-06502 and ora-06512.
o wrote:
> Oracle version is 8i and OS is Solaris 9
>
> actually what i was trying to do is writing a script for adding
> partition dynamically. the objective of the script is to add a prtition
> to a table everyday. and the maxvalue will be calculated as sysdate-1
>
> thnx
Well, you answered one question -- version and os -- but not the other: Have you looked up the error messages, and what did they say?
I failed to ask, are you getting this error when you compile the procedure, or when you run it?
As I look at your procedure:
CREATE OR REPLACE procedure add_hw_partition is
P_MaxValue varchar2(30):= to_char(trunc(sysdate -1),'SYYYY-MM-DD
HH24:MI:SS');
begin
dbms_output.put_line ((to_date((||P_MaxValue||),'SYYYY-MM-DD
HH24:MI:SS','NLS_CALENDAR=GREGORIAN')));
end;
I see nothing about partitions, so I'm ASSUMING that the dbms_output is debugging code that will be replaced by the partition creation when you get the output you like.
Actually, I get a syntax error just trying to create the procedure, using the code you posted. Received on Tue Feb 14 2006 - 08:12:28 CST