Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Date column as a partition key question

Re: Date column as a partition key question

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 13 Nov 2002 22:13:00 -0000
Message-ID: <aquiqd$c9e$1$8300dec7@news.demon.co.uk>

Your partition key has to be a column that actually exists - not a function on a column.

If you need to do this, one possible (but slower) option is to create a numeric column and populate it from the date column using a row-level trigger.

--
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar dates:
(see http://www.jlcomp.demon.co.uk/seminar.html )

____USA__________November 7/9   (Detroit)
____USA__________November 19/21 (Dallas)
____England______November 12/14

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html





Alex wrote in message
<44f08c9d.0211130927.10b33598_at_posting.google.com>...

>Dear *,
>I have one question, why follozing script does not want to work:
>CREATE TABLE sales (invoice_no NUMBER,
> sale_date DATE NOT NULL,
> sale_id INT NOT NULL)
> PARTITION BY RANGE

> (to_number (to_char (to_date (sale_date,
>'YYYYMMDDHH24MISS' ), 'MM' )))
> )
> (partition jan VALUES LESS THAN (2),
> partition feb VALUES LESS THAN (3),
> partition mar VALUES LESS THAN (4),
> partition apr VALUES LESS THAN (5),
> partition may VALUES LESS THAN (6),
> partition jun VALUES LESS THAN (7)
> partition jul VALUES LESS THAN (8),
> partition sep VALUES LESS THAN (9),
> partition oct VALUES LESS THAN (10),
> partition nov VALUES LESS THAN (11)
> );
>
>
>Thanks
>Alex
Received on Wed Nov 13 2002 - 16:13:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US