All Forums Database
srikanth471 3 posts Joined 01/12
05 Jul 2016
Partitoin

Hello Every One,
 
I have the below table and i need to add the few more partitions without dropping the table. Is this possible ?
Below are the partitions needed.

SYR =  201401 ,

SYR =  201402 ,

SYR =  201403 ,

SYR =  201404 

 

CREATE MULTISET TABLE xyz ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      PID DECIMAL(18,0) FORMAT '-(18)9',

      PNAME VARCHAR(10) CHARACTER SET LATIN CASESPECIFIC,

      SYR INTEGER,

      FAT TIMESTAMP(6),

      LAT TIMESTAMP(6))

PRIMARY INDEX SI_FQR ( PID ,PNAME ,

SYR )

PARTITION BY CASE_N(

SYR =  201501 ,

SYR =  201502 ,

SYR =  201503 ,

SYR =  201504 ,

SYR =  201601 ,

SYR =  201602 ,

 NO CASE, UNKNOWN);

 

Thanks Sri

dnoeth 4628 posts Joined 11/04
05 Jul 2016

No, you can't add partitions when you use CASE_N.
This should have been RANGE_N from the beginning like this:

RANGE_N (SYR BETWEEN  201501 AND 201504 EACH 1,
                      201601 AND 201602 EACH 1,
         NO RANGE, UNKNOWN)

Then you could simply ADD RANGE.

Dieter

srikanth471 3 posts Joined 01/12
05 Jul 2016

Thanks dnoeth....

You must sign in to leave a comment.