Archives of the TeradataForum
Message Posted: Thu, 07 Jan 2010 @ 13:14:42 GMT
Subj: | | Re: Adding a partition to a table |
|
From: | | Tewksbury, Kevin |
You just need to do the following:
Alter table bdd_blanqueo.BL_HIS_SALDOS
MODIFY PRIMARY INDEX ADD RANGE BETWEEN DATE '2010-01-02'
AND DATE '2020-01-01' EACH INTERVAL '1' DAY;
The trick is that you have to have no gaps between your current range and the range you are adding, based on your interval. For example,
if interval was 7 and your current PPI range was:
PARTITION BY RANGE_N(fec_vigencia BETWEEN DATE '2006-08-20'
AND DATE '2011-01-01' EACH INTERVAL '7' DAY ) ( which is a full
week "calendar" range of Sunday thru Saturday)
And you wanted to extend your range to the end of 2011 then it would be:
Alter table bdd_blanqueo.BL_HIS_SALDOS
MODIFY PRIMARY INDEX ADD RANGE BETWEEN DATE '2011-01-02'
AND DATE '2011-12-31' EACH INTERVAL '7' DAY;
KRT
|