Informix Error Messages and Error Codes From Error 303 to 307

SQLServerF1

Informix Error Code -303 Expression mixes columns with aggregates.
This SELECT statement uses an aggregate function in its WHERE clause. This action is not allowed. The WHERE clause must be applied row by row as a table is scanned, but an aggregate function can only be calculated after all rows have been chosen and grouped. Review the statement with this fact in mind. If you intended to select only certain groups of records, you can put that test in the HAVING clause; it is applied to grouped rows.
The text of this message is somewhat deceptive. You can, in fact, mix column names and aggregate functions in expressions. However, you can do so only in the select list or the HAVING clause (not in the WHERE clause), and the columns must appear in the GROUP BY clause.
Database servers after Version 5.01 do not use this error message.

Informix Error Code -304 HAVING can only have expressions with aggregates or columns in GROUP BY clause.
The HAVING clause is used to select completed rows after grouping has been done. Therefore, the only selected values that it can test are values that are available in completed groups of rows, namely the single columns that are named in the GROUP BY clause and aggregate values. Review the HAVING clause with this rule in mind. If you want to select particular rows before grouping has taken place, use the WHERE clause.
Informix Error Code -305 Subscripted column column-name is not of type CHAR, VARCHAR, TEXT nor BYTES.
You may select substrings only from columns of the types mentioned. Review all uses of square brackets in this statement, and make sure that each follows the name of a column that has one of these types. If that is the case, verify that you are using the database you intended, and double-check the definition of the table. Possibly one of the columns in the table has been altered to use a different type.

Informix Error Code -306 Subscript out of range.
This statement refers to a substring of a character variable. The substring values (two numbers in square brackets) are incorrect. The first is less than zero or greater than the length of the column, or the second is less than the first. Review all uses of square brackets in the statement to find the error. Possibly the size of a column has been altered and makes a substring fail that used to work.
Informix Error Code -307 Illegal subscript definition.
This statement refers to a substring of a character variable. The substring values (two numbers in square brackets) are incorrect. The first is less than zero or greater than the length of the column, or the second is less than the first. Review all uses of square brackets in the statement to find the error. Possibly the size of a column has been altered and makes a substring fail that used to work.

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 *