Question:
I get the errors ORA-14019: partition bound
element must be one of: string, datetime or interval
literal, number, or MAXVALUE and
ORA-14019: partition bound element must be one of:
string, datetime or interval literal, number, or
MAXVALUE
This is the script I used:
CREATE TABLE DEMO2
(
DF1 VARCHAR (1024),
DF2 VARCHAR (1024),
DF3 VARCHAR (1024),
DF4 VARCHAR (1024),
DF5 NUMBER,
TIME DATE,
CONSTRAINT PK_DEMO2 PRIMARY KEY (DF1, DF2, DF3, DF4,
DF5)
)
PARTITION BY RANGE (DF5)
(PARTITION DEMO2_1 VALUES LESS THAN (
(to_date('20051031','YYYYMMDD') - (10/24) - to_date('19700101','YYYYMMDD'))
* 24*60*60*10000);
Answer by rleishman:
According to the doco, the syntax is:
|
CODE
|
|
VALUES LESS THAN
({ literal | MAXVALUE }
[, { literal | MAXVALUE } ]...
) |
Which means what you provided is not quite literal
enough (even though it is entirely deterministic).
Once again, according to the doco, a numeric literal
is:
|
CODE
|
|
[ + | - ]
{ digit [ digit ]... [ . ] [ digit [
digit ]... ]
| . digit [ digit ]...
}
[ e [ + | - ] digit [ digit ]... ]
[ f | d ] |
So the clause you supplied is actually an
expression, not a literal.
You will need to perform the calculation before you
create the partition. Find out what the number comes
out as when you plug a date into the expression, and
use that number in the PARTITION clause. |