|
|
Archives of the TeradataForum
Message Posted: Fri, 24 Jun 2011 @ 10:09:07 GMT
Subj: | | Re: MLPPI on date field |
|
From: | | Mittal, Rishikesh |
I hope I understand your question, Please find the syntax....
create multiset table test_ppi
(
col1 date ,
COL2 INT
)
PRIMARY INDEX(COL2)
PARTITION BY (RANGE_N(EXTRACT(YEAR FROM COL1)
BETWEEN 1900 AND 2011 EACH '1'),
RANGE_N(EXTRACT(MONTH FROM COL1)
BETWEEN 1 AND 12 EACH '1')) ;
create multiset table test_ppi_1
(
col1 date ,
COL2 INT
)
PRIMARY INDEX(COL2)
PARTITION BY (RANGE_N(COL1 BETWEEN DATE'1900-01-01'
AND DATE'2011-12-31' EACH INTERVAL '1' YEAR),
RANGE_N(EXTRACT(MONTH FROM COL1)
BETWEEN 1 AND 12 EACH '1')) ;
- Rishi.
| |