Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 03 Jan 2007 @ 22:11:32 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016