Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem using a condition on HIGH_VALUE column in USER_TAB_PARTITIONS

user639304Apr 30 2013 — edited Apr 30 2013
Hi,

I have a table ACCOUNTS which is partitioned (with interval partitioning). There are about 10 partitions in my table.: 1 partition for a yearI used the following . Here is the script I have used to create ACCOUNTS:
create table accounts(id number primary key, val number, time_column
date) partition by range(time_column)
 interval  (numtoyminterval(1,'year'))
 (partition p0 values less than
 (to_date('01-01-2004','dd-mm-yyyy'))
);
Now, I wrote the following query, and I got an error, and I don't know how to get rid of this error:
SQL> select partition_name
  2  from user_tab_partitions
  3  where table_name='ACCOUNTS' and high_value <= to_date('01/01/2012','dd/mm/y
yyy');
from user_tab_partitions
                    *
ERROR at line 2:
ORA-00997: illegal use of LONG datatype
My aim in the above query was to list all the partitions of the ACCOUNT table which have their column HIGH_VALUE < to_date('01/01/2012','dd/mm/yyyy'). How to compare HIGH_VALUE with to_date('01/01/2012','dd/mm/yyyy')?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2013
Added on Apr 30 2013
1 comment
1,139 views