2008-02-21

BULK into confusing error messages

You are making a select statement into a BULK collection and you can get one of these error confusing messages

ORA-00947 not enough values
ORA-00913 too many values


What is the meaning of each one of these errors?



ORA-00947 (not enough values) means you have "too many values" in the select statement

ORA-00913 (too many values) means you have "not enough (number of) values" in the select statement

The error must be seen from the perspective of the BULK into.
ORA-00947 (not enough values) means you do not have "enough atributes" in the collection.
ORA-00913 (too many values) means you have "too many atributtes" in the collection.

Confused?

1 comment:

  1. Thanks for posting this. Just hit this error myself, and was confused by what it meant. It gives the same error even without a bulk collect, and points to the "from" line... to add to the confusion. Not enough values = not enough attributes in the object, not not enough rows in the select (how could it know that during compile time anyways?). Thanks again.

    ReplyDelete

Os comentários são moderados.
The comments are moderated.