Partitioning a large table by month

Giganews Newsgroups
Subject: Partitioning a large table by month
Posted by:  mister.m…@gmail.com
Date: Mon, 12 Nov 2007

Hello, I'm using Oracle 9i and I need to partition a table by months,
here's the table creation code and the code that I've managed to
create so far but hasn't worked.

Any help would be very welcomed.

Thanks

CREATE TABLE serie_d(
nombre_var_clim_sd      VARCHAR2(100),
fecha_sd                DATE,
latitud_sd               VARCHAR2(10),
longitud_sd               VARCHAR2(10),
valor_sd                NUMBER(5,2),
CONSTRAINT PK_SERIE_D
PRIMARY KEY(nombre_var_clim_sd,fecha_sd,latitud_sd,longitud_sd)
     USING INDEX TABLESPACE tbs_s,
CONSTRAINT FK_SERIE_D_VC_NOMBREVC FOREIGN KEY (nombre_var_clim_sd)
REFERENCES variable_climatica,
CONSTRAINT DOM_SD_VALOR CHECK (valor_sd between -100 and 100)
)
PARTITION BY LIST (EXTRACT(MONTH FROM fecha_sd)) (
PARTITION month01 VALUES (01)
TABLESPACE tbs_l,
PARTITION month02 VALUES (02)
TABLESPACE tbs_l,
PARTITION month03 VALUES (03)
TABLESPACE tbs_l,
PARTITION month04 VALUES (04)
TABLESPACE tbs_l,
PARTITION month05 VALUES (05)
TABLESPACE tbs_l,
PARTITION month06 VALUES (06)
TABLESPACE tbs_l,
PARTITION month07 VALUES (07)
TABLESPACE tbs_l,
PARTITION month08 VALUES (08)
TABLESPACE tbs_l,
PARTITION month09 VALUES (09)
TABLESPACE tbs_l,
PARTITION month10 VALUES (10)
TABLESPACE tbs_l,
PARTITION month11 VALUES (11)
TABLESPACE tbs_l,
PARTITION month12 VALUES (12)
TABLESPACE tbs_l)

Replies