Database DataWarehousing (MOSC)

MOSC Banner

can a range partitioned table use a function in the RANGE BY clause?

edited Feb 21, 2012 2:41AM in Database DataWarehousing (MOSC) 3 commentsAnswered
Hello

I am using oracle v 10.2.0.4 and running this command

create table test1
( time1 timestamp default sysdate not null,
  col2 number,
  col3 varchar2(5),
  date1 date)
partition by range (to_char(time1,'hh24mi'))
(
partition P0000 values less than ('00020'),
partition P0020 values less than ('00040'),

...
partition P2320 values less than ('02340'),
partition P2340 values less than ('02400'))
;

I want a partition for each 20min interval.  The command fails with this error

partition by range (to_char(time1,'hh24mi'))
                           *
ERROR at line 6:
ORA-00907: missing right parenthesis

I don't see a missing right parenthesis so I start thinking that oracle won't let me partition by anything except the name of the column ( as opposite to a function).

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center