DBA_TAB_PARTITIONS HIGH_VALUE - LONG to Number?
921009Apr 12 2012 — edited Apr 13 2012Hi all,
I need to write a procedure that will delete table partitions where the timestamp (number(38)) is less than the parameter passed in. What I want to do is compare the timestamp passed with the HIGH_VALUE of the partition. If the parameters value is > HIGH_VALUE, I want to drop the partition. I just found out that the HIGH_VALUE is a LONG. Any ideas how I can convert it to a number?
Trying something like:
for p in ( select table_name, partition_name
from dba_tab_partitions
where partition_name <> 'PRIOR_INTERVALS'
and table_name = 'FOO'
and high_value <= end_timestamp ) loop
causing:
and high_value <= ending ) loop
*
ERROR at line 21:
ORA-06550: line 21, column 20:
PL/SQL: ORA-00997: illegal use of LONG datatype
ORA-06550: line 17, column 14:
PL/SQL: SQL Statement ignored
ORA-06550: line 23, column 33:
PLS-00364: loop index variable 'P' use is invalid
ORA-06550: line 23, column 10:
PL/SQL: Statement ignored
Any ideas? Thanks
Running Oracle 11.2.0.1 btw on RHEL5