Hitachi

Hitachi Advanced Database Messages


KFAA30650-E

The number of viewed table columns is not equal to the number of columns in SELECT. (M+J+O)

There is an error in the specified CREATE VIEW statement. The number of column names specified in the column name list differs from the number of columns for the table that is derived from the query expression. <SQLSTATE: 42723>

S:

Ignores this SQL statement. Alternatively, the system invalidates this transaction.

Action:

Make sure that the number of column names specified in the column name list in the CREATE VIEW statement is the same as the number of columns for the table that is derived from the query expression.

If this message is output in either of the following cases, take the corrective action described under Procedure.

  • The ALTER VIEW statement is executed.

  • A viewed table is re-created during version upgrading of the HADB server.

    For details, see Re-creation of viewed tables in the event of a version upgrade in Notes on version upgrading in the HADB Setup and Operation Guide.

Procedure

  1. Check viewed table definition information.

    Check the CREATE VIEW statement that was used when the target viewed table was defined. You can acquire viewed table definition information by searching a dictionary table. For details about examples of searching the dictionary table, see Finding out viewed table definition information in Searching a dictionary table in the HADB Setup and Operation Guide.

  2. Delete the viewed table.

    Delete the target viewed table by using the DROP VIEW statement.

  3. Correct the information specified in the CREATE VIEW statement.

    Correct the information specified in the CREATE VIEW statement you checked in step 1.

  4. Redefine the viewed table by using the CREATE VIEW statement.

    Use the CREATE VIEW statement you corrected in step 3 to redefine the viewed table deleted in step 2.

If this message is output because an asterisk (*) is specified in the selection expression for the query specification in the CREATE VIEW statement, do not specify the asterisk (*). Correct the information specified in the CREATE VIEW statement to explicitly specify the column name in the selection expression for the query specification.