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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Partitioning question (duplicate?)

Re: Partitioning question (duplicate?)

From: Rachel Carmichael <wisernet100_at_yahoo.com>
Date: Wed, 14 Jan 2004 16:49:26 -0800
Message-ID: <F001.005DCCB6.20040114164926@fatcity.com>


First time I've seen this post. And from the fine Data Warehousing manual:

here's an example of range partitioning. Note the "to_date" in the values clause. I don't see why you couldn't use to_date(date_column,'MONTH')

Rachel

CREATE TABLE sales

  (s_productid  NUMBER,
   s_saledate   DATE,
   s_custid     NUMBER,
   s_totalprice NUMBER)

PARTITION BY RANGE(s_saledate)
 (PARTITION sal99q1 VALUES LESS THAN
(TO_DATE('01-APR-1999','DD-MON-YYYY')),
  PARTITION sal99q2 VALUES LESS THAN
(TO_DATE('01-JUL-1999','DD-MON-YYYY')),
  PARTITION sal99q3 VALUES LESS THAN
(TO_DATE('01-OCT-1999', 'DD-MON-YYYY')),   PARTITION sal99q4 VALUES LESS THAN
(TO_DATE('01-JAN-2000', 'DD-MON-YYYY')),   PARTITION sal00q1 VALUES LESS THAN
(TO_DATE('01-APR-2000', 'DD-MON-YYYY')),   PARTITION sal00q2 VALUES LESS THAN
(TO_DATE('01-JUL-2000', 'DD-MON-YYYY')),   PARTITION sal00q3 VALUES LESS THAN
(TO_DATE('01-OCT-2000', 'DD-MON-YYYY')),   PARTITION sal00q4 VALUES LESS THAN
(TO_DATE('01-JAN-2001', 'DD-MON-YYYY')));
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Rachel Carmichael
  INET: wisernet100_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Jan 14 2004 - 18:49:26 CST

Original text of this message

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