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.