Informix Error Messages and Error Codes From Error 591 to 595

SQLServerF1

Informix Error Code -591 Invalid default value for column/variable column-name/variable-name.
The specified default value is the wrong type for a column or a stored- procedure variable. The default value for a column is specified with the DEFAULT clause in a CREATE TABLE statement. The default value for a variable in a stored procedure is specified with the DEFAULT clause in a DEFINE statement in the procedure.
Informix Error Code -592 Cannot specify column to be not null when the default value is null.
This CREATE or ALTER TABLE statement specifies that a column may not contain nulls (the NOT NULL clause), but it also has a DEFAULT clause giving the default value for new rows as NULL. This contradiction is not allowed.

Informix Error Code -593 Cannot specify default value for SERIAL column.
This CREATE or ALTER TABLE statement specifies that a column has a SERIAL data type, but it also has a DEFAULT clause for the column. The database server generates values for a SERIAL column each time a row is created, so the DEFAULT clause is meaningless.
Informix Error Code -594 Cannot specify non-null default value for TEXT or BYTE column.
This CREATE or ALTER TABLE statement specifies that a column has a data type of BYTE or TEXT. It also has a DEFAULT clause for the column that specifies something other than NULL. You can only designate the default value NULL for columns of TEXT or BYTE data type.

Informix Error Code -595 Bad use of aggregate in this context.
An aggregate function was used outside an SQL statement inside a stored procedure expression, or it was used inside a check constraint.
An example of the error follows:
LET var = MAX(another_var) + 10; — error
A stored procedure expression, or the expression in a check constraint, can refer to only a single value, so the use of an aggregate function is meaningless.

Above are list of Informix Error Messages and Errors Codes or Status Codes or Exit Codes along with Error and Warning messages received while performing certain operation against Informix applications or related products.

What are Informix Error Messages?
All Informix messages returned by the Informix server are assigned an error code.

In general, each Informix error contains the following information:
• The Informix Error Code or Informix Error status
• The message text. This text is usually returned with the Error code. Some messages employ word substitution, where the word substituted represents the system-replacement of a term more specific to the occurrence.
• An explanation of how the error may have occurred.

Hope this was helpful.

Thanks,
SQLServerF1 Team
Information about Informix Error Codes or Status Codes or Exit Codes and Error Messages on Windows, Linux Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *