|
|
Archives of the TeradataForum
Message Posted: Wed, 03 Jan 2007 @ 22:11:32 GMT
Subj: | | Re: Partition Table PPI automation |
|
From: | | Mohommod.Khan |
You should be able to do an ALTER TABLE and change the PPI ranges. You can also use a shell script to do the same. In your case, you probably
can do some thing like this:
DATE1=${1}
DATE2=${2}
CREATE MULTISET TABLE dss_work.x_tbl ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
date_invoice DATE FORMAT 'YY/MM/DD',
columna SMALLINT,
columnb CHAR(35) CHARACTER SET LATIN NOT CASESPECIFIC)
PRIMARY INDEX region_date_idx ( date_invoice ,region_id )
PARTITION BY RANGE_N(date_invoice BETWEEN
DATE '${DATE1}' AND DATE '${DATE2}' EACH INTERVAL '7' DAY );
Now you can just pass the Date1 /Date2 from shell when run the bteq job. Hope this helps.
Thanks
| |