Partitoin

Database

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

2 REPLIES
Junior Contributor

Re: Partitoin

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.

Re: Partitoin

Thanks dnoeth....