| Add Range Subpartition to a hash Parition table [message #573737] |
Wed, 02 January 2013 20:03  |
pzlj6x
Messages: 107 Registered: May 2005 Location: Louisville
|
Senior Member |
|
|
Can I add range subpartition to a hash partition table.
Example like this.
CREATE TABLE test
(
test_id VARCHAR2(10 ) ,
test_TYPE VARCHAR2(5) ,
CREATE_DATE date
)
partition by hash (test_id, test_type)
Partitions 3
SUBPARTITION BY RANGE (CREATE_DATE);
When Tried, I am getting syntax error as invalid option.
Can someone please advise.
Thx
|
|
|
|
|
|
| Re: Add Range Subpartition to a hash Parition table [message #573853 is a reply to message #573745] |
Thu, 03 January 2013 11:06   |
pzlj6x
Messages: 107 Registered: May 2005 Location: Louisville
|
Senior Member |
|
|
yes, I agree. in general and most preferable way it should be how you have described. However, our business requirement and dba maintenance forces me to think differently. Hence was looking alternate option. Does Oracle allow hash partition and subpartiiton on date range?
Thanks
|
|
|
|
|
|
| Re: Add Range Subpartition to a hash Parition table [message #573969 is a reply to message #573855] |
Fri, 04 January 2013 11:58   |
pzlj6x
Messages: 107 Registered: May 2005 Location: Louisville
|
Senior Member |
|
|
Thank you Michel.
Am I doing anything wrong here..
CREATE TABLE test
(
slno VARCHAR2(10),
CREATE_DATE TIMESTAMP (6)
)
partition by hash (slno)
Partitions 1
SUBPARTITION BY RANGE
(
CREATEDATE
)
INTERVAL (NUMTOYMINTERVAL(1,'month'))
(
SUBPARTITION s1 VALUES LESS THAN (TO_DATE('20100801', 'YYYYMMDD'))
) ;
It gives me error as
SQL Error: ORA-00922: missing or invalid option
00922. 00000 - "missing or invalid option"
|
|
|
|
|
|
|
|
|
|
|
|