drop partition with clause

"nh" <[email protected]> Thu, 27 Mar 2003 16:27:31
Newsgroups gmane.comp.db.oracle.devel
Message-ID <LYRIS-1796914-929458-2003.03.27-16.08.46--gcdod-oracle#[email protected]>
Hi there!
I have a partitionned table by date:

> create table T (d date, i integer) partition by range(d) (partition pi 
values less than (to_date('01012003','ddmmyyyy')));

Each partition is huge (about 100.000 lines) and concerns a particular day.

Then I store data for 370 days.

So each day I add a partition and drop a 370 days old one...

I wish to know if there is a way to drop several partitions with query 
like:
>alter table T drop partition pi where d < aDate;

Indeed if I drop only the 370 days old partition (and not 370 and more 
years old partition), if one day I do not execute this query the partition 
will still exist...

e.g:

T:
d           i
01012001    20             partition p01012001
02012001    29             partition p02012001
03012001    30             partition p03012001

I wish to delete both p01012001 and p02012001...

In real case I do not know which partition exists before date d...

Many thanks...
---
Change your mail options at http://p2p.wrox.com/manager.asp or 
to unsubscribe send a blank email to [email protected].