Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    206

    Unanswered: Error in Alter table alter partion command on db2 z/os

    Hello Db2 colleagues,

    ALTER TABLE TABLE
    ALTER PARTITION (
    PARTITION 29 ENDING AT ('1', 123),
    PARTITION 30 ENDING AT ('1', 500),
    PARTITION 31 ENDING AT ('1', 1000),
    PARTITION 32 ENDING AT ('1', 20000),
    PARTITION 33 ENDING AT ('1', 450000),
    PARTITION 34 ENDING AT ('1', MAXVALUE),
    PARTITION 35 ENDING AT (MAXVALUE, MAXVALUE));
    ---------+---------+---------+---------+---------+---------+---------+---------
    DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "(". SOME SYMBOLS THAT MIGHT
    BE LEGAL ARE: <INTEGER>
    DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
    DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
    DSNT416I SQLERRD = 3 0 0 -1 93 502 SQL DIAGNOSTIC INFORMATION
    DSNT416I SQLERRD = X'00000003' X'00000000' X'00000000' X'FFFFFFFF'
    X'0000005D' X'000001F6' SQL DIAGNOSTIC INFORMATION

  2. #2
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    107
    Provided Answers: 13
    Hello,

    Have you checked the ALTER TABLE ALTER PARTITION syntax?
    Regards,
    Mark.

  3. #3
    Join Date
    Jul 2016
    Location
    Germany
    Posts
    32
    Provided Answers: 2

    quick and dirty

    quick and dirty

    Hi DB_N00b,

    this might help for a start:
    ALTER TABLE PRODUCTS ALTER PARTITION 3 ENDING AT ('249');
    ALTER TABLE PRODUCTS ALTER PARTITION 4 ENDING AT ('279');
    ALTER TABLE PRODUCTS ALTER PARTITION 5 ENDING AT ('299');
    from
    https://www.ibm.com/support/knowledg...partition.html

    Good luck
    db2dp

  4. #4
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    A slight modification of db2dp's suggestion:
    Code:
    ALTER TABLE PRODUCTS ALTER PARTITION 3 ENDING AT ('249'),
                         ALTER PARTITION 4 ENDING AT ('279'),
                         ALTER PARTITION 5 ENDING AT ('299');
    This is one Alter Table statement instead of three Alter Table statements.

    NOTE: I have not tested this. The syntax should be correct but needs to be checked.

Posting Permissions

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