Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012
    Posts
    177

    Unanswered: db2 range partition for tables

    Hi all,

    In our setup db2 V9.7 with fixpack 4

    Question with partitioning the tables.

    Planning to do the Range partition for the tables. Using timestamp column.

    MIN DATE MAX DATE
    17-05-2004 14-05-2013

    DDL:

    CREATE TABLE "db2DWH".TIS_DW_METRIC_VOL1 (
    "SITE_ID" INTEGER NOT NULL,
    "ITM_ID" INTEGER NOT NULL,
    "SRVY_TMS" TIMESTAMP NOT NULL,
    "TFM_ID" INTEGER NOT NULL,
    "ORGN_LEG_NBR" SMALLINT NOT NULL,
    "DEST_LEG_NBR" SMALLINT NOT NULL,
    "DTCTR_ID" INTEGER NOT NULL
    )
    DATA CAPTURE NONE
    IN "METRIC_VOL_TAB"
    PARTITION BY RANGE ("SRVY_TMS") (STARTING "17/05/2004 00:00:00" ENDING "14/05/2013 00:00:00" EVERY 1 YEAR);
    COMPRESS NO;

    When i executed I am getting the below error:
    An unexpected token ""17/05/2004 00:00:00" ENDING "14/05/2013 " was found following "SRVY_TMS") (STARTING". )

    How to do the range partition by using the timestamp column?

    Thanks
    laxman.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by laxman babu View Post
    How to do the range partition by using the timestamp column?
    I'd start with supplying timestamp literals in the correct format.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •