6 Replies Latest reply: Apr 19, 2013 8:05 AM by spajdy RSS

    How to create partition on a column of a table on daily basis

    999965
      Hi all ,
      i have wriiten one query that is not working, i have one column of varchar type and i want to create partition of table on that column based on daily interval. but ist is giving error...

      my query is ..

      create table user_detail
      (username varchar2(50),
      userid number,
      country varchar2(25),
      accupation varchar2(100),
      company varchar2(100),
      joindate varchar2(14))
      partition by range (joindate)
      INTERVAL(NUMTOYMINTERVAL(1, 'DAY'))
      (PARTITION newone VALUES LESS THAN (to_date('13-04-19', 'yy-mm-dd')));


      error is :

      Error starting at line 1 in command:
      create table user_detail
      (username varchar2(50),
      userid number,
      country varchar2(25),
      accupation varchar2(100),
      company varchar2(100),
      joindate varchar2(14))
      partition by range (joindate)
      INTERVAL(NUMTOYMINTERVAL(1, 'DAY'))
      (PARTITION newone VALUES LESS THAN (to_date('13-04-19', 'yy-mm-dd')))
      Error at Command Line:1 Column:0
      Error report:
      SQL Error: ORA-14751: Invalid data type for partitioning column of an interval partitioned table


      can i create partition on varchar datatype?