SQL - SQLCODE's - Códigos negativos -846


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

SQLCode -846

   
 
  • Causa
    • INVALID SPECIFICATION OF AN IDENTITY COLUMN OR SEQUENCE OBJECTobject-type object-name.
      REASON CODE = reason-code

      For an identity column or sequence, the specification of an attribute in a CREATE or ALTER statement might be invalid.

      This message is also issued if object-name identifies a DB2_GENERATED_DOCID_FOR_XML column.
      object-type
      The type of object.
      object-name
      The name of the object.
      reason-code
      The reason for the message or SQL code, indicated by one of the following values:
      1
      The underlying data type of the identity column or sequence object is not supported.
      Identity columns and sequence objects support the following data types: SMALLINT, INTEGER, BIGINT, and DECIMAL (or NUMERIC) with a scale of zero.
      2
      The value for START WITH, INCREMENT BY, MINVALUE, MAXVALUE, or RESTART WITH is outside the range for the data type of the identity column or sequence object.
      If the sequence being altered is DSNSEQ_IMPLICITDB, the value for MAXVALUE is outside the range between 1 and 60000, inclusive.
      3
      MINVALUE must be less than or equal to MAXVALUE.
      4
      An invalid value was specified for CACHE. The value must be an INTEGER with a minimum value of 2.
      5
      An edit procedure that is defined with row attribute sensitivity was specified for the identity column.
      6
      An identity column was specified for a global temporary table that was already defined by a CREATE GLOBAL TEMPORARY TABLE statement.
      This error could occur for a CREATE GLOBAL TEMPORARY TABLE statement, or an ALTER TABLE statement for a global temporary table when there is an attempt to add an identity column to an existing global temporary table that was already defined by a CREATE GLOBAL TEMPORARY TABLE statement.
  • Ação do sistema
    • The statement cannot be processed.
  • Resposta ao Desenvolvedor
    • Correct the syntax and resubmit the statement.

      SQLSTATE: 42815
© Copyright IBM Corp.