getting partition name for a value
Is the a query I can issue that will return me the partition name based on
a specific value of the column that is being paritioned/
Assume I have the following table definition (see below). What query
can I use to find the parition name for dt=20101231
In the example below I would expect to see "part1"
CREATE TABLE t
PARTITION BY RANGE (dt)
PARTITION part1 VALUES LESS THAN (to_date('05-jan-2011','dd-mon-yyyy')) ,
PARTITION part2 VALUES LESS THAN (to_date('06-jan-2011','dd-mon-yyyy')) ,
PARTITION junk VALUES LESS THAN (MAXVALUE)
) storage ( initial 10m ) tablespace users
Sure - just query dba_tab_partitions.
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width