Start of change

-20487   HASH ORGANIZATION CLAUSE IS NOT VALID FOR table-name

Explanation

The table cannot be altered as specified.

table-name
The name of the table.

Possible causes for this error include:

  • A clause was specified on an ALTER TABLE statement, but the attribute cannot be set or changed because the table is not defined with hash organization.
  • ADD ORGANIZE BY HASH was specified on an ALTER TABLE statement, but the table is already defined with hash organization.
  • ADD ORGANIZE BY HASH was specified on an ALTER TABLE statement, but the table is already defined with a clustering index. Hash organization cannot be added to a table with a clustering index.
  • ADD ORGANIZE BY HASH was specified on an ALTER TABLE statement, but either the table is defined with APPEND YES, or it is a materialized query table.
  • ADD ORGANIZE BY HASH was specified on an ALTER TABLE statement, but the table is defined in a table space that is defined with MEMBER CLUSTER. Or, hash organization was specified on a CREATE TABLE statement that specifies a table space which is defined with MEMBER CLUSTER.
  • HASH SPACE was specified on a table that is not defined to be organized by hash. If the table is not defined with hash organization, the HASH SPACE keyword is invalid in a partition element.
  • HASH SPACE was specified on a table that resides in a table space which is not in reordered row format.

System action

The statement cannot be processed.

User response

Either correct the syntax of the statement or specify a different table. Then reissue the statement.

SQLSTATE

428HJ

End of change