View previous topic :: View next topic
|
Author |
Message |
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
I am trying to execute the following DDL but continue to receive a -636. I know where the error is but my question is why does this DDL not execute successfully? Thanks.
CREATE TABLE DB2DBA.CMSTSTT8
( "COLA" CHAR(6) NOT NULL ,
"COLB" CHAR(4) NOT NULL)
PARTITION BY
( COLA ASC,
COLB ASC)
(PARTITION 1 ENDING AT('15047 OE46')
,PARTITION 2 ENDING AT('15047 OE50'))
IN "CMSDBT04"."CMSTSTS8"
ENDING AT (constant or MAXVALUE, ...)
# Defines the limit key for a partition boundary. Specify at
# least one value (constant or MAXVALUE) after ENDING AT in each
# PARTITION clause. You can use as many values as there are
# columns in the key. The concatenation of all values is the
# highest value of the key for ascending and the lowest for
# descending
After reading this excerpt from the IBM manual I assume the DDL statement should work. Is there an existing APAR I missed to fix this? Thanks for any help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you post the CREATE INDEX for the partitioning keys for this as well. . .
Also from IBM:
Quote: |
-636 THE PARTITIONING KEYS FOR PARTITION part-num ARE NOT SPECIFIED IN
ASCENDING OR DESCENDING ORDER
Explanation: In the CREATE INDEX statement for the CLUSTER index for a partitioned table (that is, a table residing in a partitioned table space), the partitioning key values specified in the limit key value specifications were not in either ascending or descending order. |
|
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Dave,
You tried to create a table-controlled partitioning. Only reason you got that error is due to few quotes & commas missing.
You were partitioning the table by using 2 columns PARTITION BY, and in the ENDING AT, there has to be 2 columns not 1. Values in 2 columns doesn't stick together.
I tried this in my SHOP, it worked.
Code: |
CREATE TABLE shandb.testing
( "COLA" CHAR(6) NOT NULL ,
"COLB" CHAR(4) NOT NULL)
PARTITION BY
( COLA ASC,
COLB ASC)
(PARTITION 1 ENDING AT('15047','OE46')
,PARTITION 2 ENDING AT('15047','OE50'))
IN shandb.parts |
Sushanth Bobby |
|
Back to top |
|
|
David Joyce
New User
Joined: 08 Aug 2008 Posts: 17 Location: Boulder Colorado
|
|
|
|
Sushanth,
Thank you. I am using a tool to create the limit keys and there is no defined differentiation between values for one or two columns. |
|
Back to top |
|
|
|