Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 20 Dec 2010 @ 20:47:26 GMT


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


Subj:   Re: PPI Table - ALTER Assistance - help!!!
 
From:   Dieter Noeth

John_Wight wrote:

  Have tables that we need to extend Partitions on . most are OK with Date Ranges and not a problem.  


  We have some stage tables that use RANGE_N as follows:  


          > CREATE MULTISET TABLE xxx_STAGE.axxxxx_billog_stg ,NO FALLBACK ,
          ...
          > UNIQUE PRIMARY INDEX upi_axxxxx_billog_stg
          >          ( biodr ,biseq , bicnt ,joiso ,jotime ,joseqn ) PARTITION BY CASE_N(
          > joiso<    20090131 , joiso<    20090231 , joiso<    20090331 , joiso<
          >   20090431 , joiso<    20090531 , joiso<    20090631 , joiso<    20090731,
          > joiso<    20090831 , joiso<    20090931 , joiso<    20091031 , joiso<
          >   20091131 , joiso<    20091231 , joiso<    20100131 , joiso<    20100231,
          > joiso<    20100331 , joiso<    20100431 , joiso<    20100531 , joiso<
          >   20100631 , joiso<    20100731 , joiso<    20100831 , joiso<    20100931,
          > joiso<    20101031 , joiso<    20101131 , joiso<    20101231 ,
          >   NO CASE);
  We now need to extend partitions for 2011 and 2012 as per 2009 and 2010 above.  


You can't, because it's CASE_N not RANGE_N.

Maybe this will work:

     PARTITION BY RANGE_N(
     joiso between 20090031 and 20091231 each 100,
                    20100031 and 20101231 each 100,
                    20110031 and 20111231 each 100,
       NO RANGE);

And now you might use ADD RANGE :-)


Dieter



     
  <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: 15 Jun 2023