Menu principal                 [Fechar]


SQL - SQLCODE's - Códigos negativos


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por Carlos Alberto Dornelles - Analista de Sistemas - Brasília DF.


SQLCode -150

A obejto de uma declaração de INSERT, DELETE ou UPDATE é uma VIEW ou uma tabela transitória para qual a operação requisitada não é permitida

Conclusão: One of the following occurred:

  • A transition table was named in an INSERT, UPDATE, or DELETE statement in a triggered action. Transition tables are read-only.

  • The view named in the INSERT, UPDATE, or DELETE statement is defined in such a way that the requested insert, update, or delete operation cannot be performed upon it.

    Inserts into a view are prohibited if:

    • The view definition contains a join, a GROUP BY, or a HAVING clause.

    • The SELECT clause in the view definition contains the DISTINCT qualifier, an arithmetic expression, a string expression, a built-in function, or a constant.

    • Two or more columns of the view are derived from the same column.

    • A base table of the view contains a column that does not have a default value and is not included in the view.

    Updates to a view are prohibited if:

    • The view definition contains a join, a GROUP BY, or a HAVING clause.

    • The SELECT clause in the view definition contains the DISTINCT qualifier or a function.

    Also, a given column in a view cannot be updated (that is, the values in that column cannot be updated) if the column is derived from an arithmetic expression, a constant, a column that is part of the key of a partitioned index, or a column of a catalog table that cannot be updated.

    Deletes against a view are prohibited if:

    • The view definition contains a join, a GROUP BY, or a HAVING clause.

    • The SELECT clause in the view definition contains the DISTINCT qualifier or a built-in function.

Ação do sistema: O comando não pode ser executado. Nenhuma dado foi inserido, alterado ou deletado.

Resposta ao Desenvolvedor: The requested function cannot be performed on the view. Refer to Chapter 5 of DB2 SQL Reference for further information regarding inserting, deleting, and updating views.

If the error occurred on a CREATE TRIGGER statement, remove the INSERT, UPDATE, or DELETE reference to the transition table.

SQLSTATE: 42807


© Copyright IBM Corp.