Error Number 300 – 399.

300 There are too many GROUP BY columns.

The number of columns that can be listed in the GROUP BY clause is an implementation limit of the database server. All database servers support at least eight columns. Review the current statement to ensure that the punctuation of the GROUP BY clause is correct.
If it is as you intended, you will have to find a way to make this query in two or more stages. Since you must list all nonaggregate selected columns in the GROUP BY clause, and the length of the list is restricted, you must select only the non-aggregate values that are required to distinguish each group. Put the group results in a temporary table, and join this table to the original table to select other non-aggregate values.

301 The total size of the GROUP BY columns is too big.

The database server limits the total number of bytes in the combined columns that the GROUP BY clause lists. All database servers support at least 120 bytes. See the discussion of error -300 for more information.

302 No GRANT option or illegal option on multi-table view.

This GRANT statement cannot be executed. The grantor does not have the right to grant the specified privilege for this table, the table name is a synonym, or the table is a view for which this option cannot be granted. If the grantor does have the right to grant the privilege, the table in question might be a synonym or a view that is not modifiable and cannot be used for insert, update, or delete operations. Starting with version 9.40, you can define an INSTEAD OF trigger on the view to make it modifiable and then try this option.
To grant any privilege for a table, you must be the owner of the table or you must have been granted the same privilege with the GRANT option. To use the AS GRANTOR clause, you must have DBA privilege.

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.

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.

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.

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.

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.

308 Corresponding column types must be compatible for each UNION statement.

All rows produced in a union of SELECT statements must have the same format, so the corresponding columns for each UNION statement must have the same data type or compatible data types. Two data types are compatible if you can convert one of them into the other; for example, int and float are compatible data types because you can convert int values to float values. In the current statement, a column in the second or subsequent SELECT statement does not agree with the corresponding column in a preceding SELECT statement.
Review and compare all the SELECT statements. Check each point at which one statement selects a column that is not identical to a column in the preceding SELECT statement. If the column data types do not match, then one type must be convertible to the other type.

309 ORDER BY column or expression must be in SELECT list.

An expression or column name is in the ORDER BY clause of this SELECT statement, but the expression or column name is not in the select list (the list of values that follows the word SELECT). This action is not supported when a UNIQUE or DISTINCT operator is being used in a query.
When a UNIQUE or DISTINCT operator is being used in a query, all sort keys must be present in the output rows to determine the true order. Revise the statement to follow this rule.

310 Table table-name already exists in database.

This statement tries to create a table with the name that is shown, but one with that name already exists. Only one table with a given name can exist in a single database. (In an ANSI-compliant database, the name of the user that created a table name qualifies it, so one table of a given name per user can exist.)
Check the spelling of the name; if it is as you intended, and you are sure it should not exist, check that you are using the right database. You can review the names of all tables in this database by querying systables as follows:
SELECT tabname FROM systables WHERE tabid > 99
This statement will display only names of permanent tables, not temporary tables. Temporary tables do not appear in systables. If the name does not appear, end your database session and start a new one. Temporary tables will be dropped.

311 Cannot open system catalog table-name.

The database server cannot access one of the tables in the system catalog. Check the accompanying ISAM error code for detailed information, and look for operating-system error messages that might give more information.

312 Cannot update system catalog table-name.

The database server cannot record a change in the system-catalog table. Check the accompanying ISAM error code for more detailed information. Insufficient disk space is a common cause of this error.

313 Not owner of table.

This statement tries to do something, such as dropping a table, that only the owner of the table or a user who has Database Administrator privileges can do. Check that the statement names the table you intended. If it does, you will have to get its owner or a DBA to execute this statement. To find out who to contact, you can query the system catalog as follows:
SELECT tabname, owner FROM systables WHERE tabid > 99; SELECT username FROM sysusers WHERE usertype = ‘D’

314 Table table-name currently in use.

This statement tries to do something, such as dropping a table, that cannot be done while another user is using the table. Wait a short time, and try again. To ensure that no table is in use, open the database with DATABASE EXCLUSIVE.

315 No create index permission.

This statement tries to create an index for a table. Either you do not have INDEX privilege on this table, or the table itself is a view or synonym. If the table that is named really is a table, contact the owner of the table or a database administrator (see the discussion of error -313) and ask to be granted this privilege.

316 Index already exists in database.

This statement tries to create an index with the name shown, but an index of that name already exists. Only one index of a given name can exist in a single database.
Check the spelling of the name. If it is as you intended, and you are sure it should not exist, make sure you are using the right database. To review the names of all indexes and their owners, join systables and sysindexes as follows:
SELECT T.tabname, I.idxname, I.owner FROM systables T, sysindexes I WHERE I.tabid = T.tabid AND T.tabid > 99

317 Must have the same number of selected columns in each UNION element.

All rows that are produced in a union must have the same format, so each SELECT statement in the union must select the same number of columns. In this union, one of the second or subsequent SELECT statements does not list the same number of columns as the preceding one. Review the entire union, and check that all select lists are alike in number and data type. If no appropriate column exists for one of the statements, specify a literal value of the appropriate type at that position. For example, where you need to match a numeric column, specify a literal zero.

318 File with the same name as specified log file already exists.

The transaction log file you specify in the WITH LOG IN clause cannot already exist. The database server must start a new log file; it cannot append log data to an old log file. An existing log file contains recovery information that might be crucial, so it does not simply empty an existing file. To begin logging for a database that has not been logged before, lock the database, copy all of the database directory to a backup medium, and use the START DATABASE statement to name a new file. To make a partial archive subsequently, lock the database, copy the log file to a backup medium and store it with the full archive, erase or rename the log file, and use the START DATABASE statement.

319 Index does not exist.

This statement refers to an index that does not exist. Review the spelling of the index name; if it is as you intended, and you are sure it should exist, make sure you are using the right database.
In an ANSI-compliant database, an index that you do not own must be qualified with its owner’s name. See the discussion of error -316 for a way to check the names and owners of all indexes.
Index does not exist in ISAM file.
This statement refers to an index that does not exist. (The reference to an ISAM file is not relevant; ignore it.) Review the spelling of the index name; if it is as you intended, and you are sure it should exist, make sure you are using the right database.
In an ANSI-compliant database, an index that you do not own must be qualified with its owner’s name. See the discussion of error -316 for a way to check the names and owners of all indexes.

320 Not owner of index.

This statement tries to do something, such as dropping an index, that only the owner of the index or a user who has Database Administrator privileges can do. Check that the statement names the index that you intended. If it does, you will have to get its owner or a DBA to execute this statement. See the discussion of error -316 for a way to list the names and owners of indexes.

321 Cannot group by aggregate column.

The GROUP BY clause in this statement refers to a selected value that is an aggregate function. This action is not supported. (It does not make sense to group rows using a value that cannot be computed until the group has been formed.) You can group rows by the value of columns or expressions on columns, but the expressions cannot include aggregate functions. Review the GROUP BY clause, and compare it to the select list. Possibly one of the column numbers in the GROUP BY clause is incorrect.

322 Cannot create a trigger on, alter, rename view view-name.

Starting with version 9.40, you can only create an INSTEAD OF trigger on a view. You cannot create an INSTEAD OF trigger on a view created using WITH CHECK OPTION.
Consider creating the trigger on the base table of the view or create a table with the same schema as the view and then define the trigger on the table.
You can also receive this message if you issue the START VIOLATIONS TABLE statement or the STOP VIOLATIONS TABLE statement for a view. You must specify the name of a base table in both of these statements.

323 Cannot grant permission on temporary table.

This GRANT statement names a temporary table. That action is not supported. Privileges are recorded only for permanent tables. Because temporary tables are not recorded in the system catalogs, no place exists to record privileges on them. Only the person who creates a temporary table can access it.

324 Ambiguous column column-name.

The column name appears in more than one of the tables that are listed in the FROM clause of this query. The database server needs to know which columns to use. Revise the statement so that this name is prefixed by the name of its table (table-name.column) wherever it appears in the query. If the statement becomes unwieldy, give the table a shorter alias name in the FROM clause (see the discussion of error -316 for an example).

325 Filename must be specified with a full path name.

This error occurs if you attempt to create a table using the WITH LOG IN clause but do not specify a complete path to the log file. This error can also occur if you use INFORMIX-SE to create database logging but do not specify the full path of the log file. Make sure to specify a full pathname, including the name of the log file, where the log file will reside.

326 Referential constraint has too many referenced columns.

The specified referential constraint has more than 16 columns (or 8 in INFORMIX-SE).

327 Cannot unlock table table-name within a transaction.

The statement UNLOCK TABLE is not allowed within a transaction, that is, following the execution of BEGIN WORK. You can still use LOCK TABLE when you use transactions, but the table will be unlocked automatically when the transaction ends. All locks are released at the end of a transaction. In an ANSI-compliant database, BEGIN WORK is not used, a transaction is always in effect, and the UNLOCK TABLE statement is never used.

328 Column column-name already exists in table.

This statement tries to add the column shown, but one with that name already exists. Check the spelling of the name; if it is as you intended, then the table is not arranged as you expected it to be. You can review the names of all the columns in a table by querying syscolumns. Supply a table-name in the following query:
SELECT colname, colno FROM syscolumns C, systables T WHERE C.tabid = T.tabid AND T.tabname = ‘table-name’
You can use RENAME COLUMN to change column names.

329 Database not found or no system permission.

The database you tried to open is not visible to the database server. Check the spelling of the name. Possibly the database is located in a different database server (or network system), and you have omitted to specify the server name (or site name) with the database name. If you are sure the database should exist just as you spelled it, your next step depends on the database server you are using.
If you are using INFORMIX-SE, the visible databases are directories with names in the form dbname.dbs. You must be able to read from and write to them. The database server looks first in the current working directory and then in each directory named in the DBPATH environment variable. The most common cause of this error is an incorrect setting or no setting for the DBPATH environment variable.
If you are using Informix Dynamic Server, INFORMIX-Universal Server, or INFORMIX-OnLine Dynamic Server, the database does not exist as you spelled it. In some environments, two or more instances of the database server can run at once and each instance has its own collection of databases. For Version 6.0 and later, the value of the INFORMIXSERVER environment variable determines the instance of the database server that you use. For Versions 5.1x and earlier, the TBCONFIG environment variable points to the configuration file that determines the instance. See your database server administrator if you think you might be using the wrong instance.
The -329 error can be caused by a number of problems – version 4.2 has been updated to throw less general errors in the circumstances we’re seeing. The common errors for an Oracle connection which would throw -329 are:
Unable to translate the database to an Oracle connection (this will normally be accompanied by an ISAM error of -1017). Attempting to issue SQL without a database connection The database driver failed to load
The last case is a little tricky to hunt – depending on the compiler version, you should get more information on the command line which would indicate this problem. In the case of Oracle, the database driver fails to load because it has problems finding the Oracle client library ‘libclntsh.so’.
There are a number of reasons this may happen.
The first is that your LD_LIBRARY_PATH variable does not contain $ORACLE_HOME/lib. The second is that you are using a compiler pre-4.2, which looks for the client library by name (e.g. libclntsh.so.9.0). In this case, if you are using Oracle 10g, you will need to do the following:
ln -s $ORACLE_HOME/lib/libclntsh.so.10.1 $ORACLE_HOME/lib/libclntsh.so.9.0 # it may be called libclntsh.so.10.0

330 Cannot create database.

Possibly you tried to create a database with the same name as one that already exists; if so, choose a different name. Otherwise, check the accompanying ISAM error code for more detailed information on the cause. Possibly a shortage of disk space or a problem with file permissions exists.

331 Cannot drop database directory.

While the database server was executing the DROP DATABASE statement, it removed all database-related files from the dbname.dbs directory and tried to remove the directory itself, but an error occurred. Check the accompanying ISAM error code for more detailed information on the cause. The most likely cause is that you or another user created nondatabase files in the same directory, and the directory cannot be removed because it is not yet empty.

332 Cannot access audit trail name information.

An error occurred while reading the audit-trail file. Re-execute the latest statement; if the error recurs, the audit-trail file is corrupt. In that case you will need to drop and restart the audit.

333 The audit trail file already exists with a different name.

Before you start a new audit trail, you must drop an existing one. Use the DROP AUDIT statement.

334 Cannot create audit trail.

Some problem prevents the database server from initializing the audit-trail file. Check that you specified a complete, correct pathname for the file. Look for operating-system error messages that might give more information. Common problems include a lack of disk space and file-permission problems.

335 There is no audit trail for the specified table.

This statement requires an audit trail to work, but no current audit trail exists for the table. Either none was ever started, or it was dropped. Check that you specified the table you intended. In a recovery situation (the statement was RECOVER TABLE), check that the table has just been restored from a backup copy. If so, the table did not have an audit trail at the time that this backup was made. If an audit trail was specified later, an unknown period remains between the backup and the start of auditing during which unaudited updates might have been made.

336 Cannot create or drop audit on a temporary table table-name.

Temporary tables cannot be audited. The commands regarding audit trails will not accept the names of temporary tables. If you did not intend to name a temporary table, check the spelling of the table table-name. See the discussion of error -313 for a way to display the names of all permanent tables in the database.

337 Cannot create view on temporary table table-name.

Views can be created only on permanent tables. The SELECT statement that defines the view in this latest statement contains the name of the temporary table, table-name. If you did not intend to name a temporary table, check the spelling of table-name. See the discussion of error -313 for a way to display the names of all permanent tables in the database.

338 Cannot drop audit trail.

An unexpected error occurred during the execution of a DROP AUDIT statement. Check the accompanying ISAM error code for more detailed information.

339 The audit trail file name must be given in full directory path.

The audit-trail file that is specified in the CREATE AUDIT statement requires a full directory path. Because it is not required to be in a particular directory, the database server cannot use the current directory or the DBPATH variable to search for it.

340 Cannot open audit trail file.

The database server needs to use the audit-trail file for this table, but some unexpected problem prevents it. Likely causes include hardware errors, file-permission problems, or the accidental erasure of the file. Look for operating-system error messages that might give more information.

341 Could not read a row from audit trail file.

The database server encountered an unexpected error while it was reading the audit trail for this table. Likely causes of the error include file-permission problems and hardware errors. Look for operating-system error messages that might give more information.

342 Remote host cannot execute statement.

This statement was sent to a database server in a different system for execution. However, that database server does not support the requested function, possibly because it is an earlier version.

343 Row from audit trail was added to a different position than expected.

While the database server was reconstructing a table from the audit trail, it found a discrepancy between the position of an inserted row now and the position that was recorded in the audit trail when the row was first inserted. Either the audit-trail file has been corrupted, or the audit-trail file is incomplete, with missing records for some alterations. The table cannot be recovered as it stands. Try the operation again after you make sure that the table has been restored to exactly the same state as when the audit trail was created. If the error recurs, rebuild the table by other means.

344 Cannot delete row – row in table does not match row in audit trail.

While the database server was reconstructing a table from the audit trail, it found a discrepancy between the position of a deleted row now and the position that was recorded in the audit trail when the row was first deleted. Either the audit-trail file has been corrupted, or the audit-trail file is incomplete, with missing records for some alterations. The table cannot be recovered as it stands.
Try the operation again after you make sure that the table has been restored to exactly the same state as when the audit trail was created. If the error recurs, rebuild the table by other means.

345 Cannot update row – row in table does not match row in audit trail.

While the database server was reconstructing a table from the audit trail, it found a discrepancy between the contents of an updated row now and the contents that were recorded in the audit trail when the row was first updated. Either the audit-trail file has been corrupted, or the audit-trail file is incomplete, with missing records for some alterations. The table cannot be recovered as it stands. Try the operation again after you make sure that the table has been restored to exactly the state it had when the audit trail was created. If the error recurs, rebuild the table by other means.

346 Could not update a row in the table.

While the database server was processing an UPDATE, it received an unexpected error. Check the accompanying ISAM error code for more detailed information on the cause. Possible causes include hardware errors and locking conflicts.

347 Could not open table for exclusive access.

The database server cannot complete a LOCK TABLE statement or the implicit LOCK TABLE that must be performed as part of other statements that change the definition of a table (for example ALTER TABLE, RENAME, or CREATE INDEX). Check the accompanying ISAM error code for more detailed information on the cause. Possible causes include lock conflicts, a full lock table, or low-level problems with the host operating-system lock mechanism.

348 Could not read a row from the table.

While the database server was trying to fetch a row from a table, it received an unexpected error. Check the accompanying ISAM error code for more detailed information on the cause. Possible causes include hardware errors and lock conflicts.

349 Database not selected yet.

This statement cannot be executed because no current database exists. Either no current database has been established yet, or the current database was closed with a CLOSE DATABASE statement. You execute the DATABASE or CREATE DATABASE statement to establish a current database.

350 Index already exists on column.

This CREATE INDEX statement cannot be executed because an index on the same column or combination of columns already exists.At most two indexes can exist on any combination of columns, one ascending and one descending. To display the indexes on a particular table, join sysindexes and systables. Supply table-name in the following statement:
SELECT * FROM sysindexes, systables WHERE sysindexes.tabid = systables.tabid AND systables.tabname = ‘table-name’
The sysindexes table is not normalized (the part columns are a repeating group), so no simple SELECT statement will return all the column names in an index.

351 Database contains tables owned by other users.

This DROP DATABASE or UPDATE STATISTICS statement cannot be carried out for the reason shown. It might destroy the work of others. In order to drop this database, you must first drop all tables that other users own. To do so, you must have database administrator privilege. See the discussion of error -313 for a way to list the names of all tables with their owners.

352 Column column-name not found.

The column, or one of the columns, named in this CREATE INDEX statement does not exist. Review the spellings of all columns in the statement. See the discussion of error -328 for a way to list all column names in a table.

353 No table or view specified when granting/revoking privileges.

This statement specifies one of the table-level privileges (ALTER, DELETE, INDEX, INSERT, SELECT, UPDATE, and ALL) but does not specify the table to which the privilege applies. When you grant or revoke a database-level privilege (CONNECT, DBA, RESOURCE), you can not name a table, but when you grant or revoke a table-level privilege you must name a table.

354 Incorrect database or cursor name format.

This statement contains the name of a database or a cursor in some invalid format. If the statement is part of a program, the name might have been passed in a host variable.
The maximum length for database names and cursor names depends on the database server. In Informix Dynamic Server 9.2x or 9.3, the maximum length is 128 characters. For INFORMIX-SE, database names should be no longer than 10 characters (fewer in some host operating systems). In other Informix database servers, the maximum length is 18 characters.
Both database and cursor names must begin with a letter and contain only letters, numbers, and underscore characters. In INFORMIX-OnLine Dynamic Server and later Informix database servers, database and cursor names can begin with an underscore. In Dynamic Server 9.2x or 9.3, these names can include dollar-sign characters.
In MS-DOS systems, filenames can be a maximum of 8 characters plus a 3-character extension.

355 Cannot rename file for table.

This RENAME statement cannot be completed because the database server got an unexpected error. Check the accompanying ISAM error code for more detailed information on the cause. Possible causes include hardware errors and file-permission problems.

356 Data type of the referencing and referenced columns do not match.

The data types of the columns in the child constraint must be identical to those in the parent constraint.

357 Dependent table for view view-name has been altered.

The view is based on data from a table that has been altered since the view was defined. The alteration removed or renamed a column that is used in the view. The view can no longer be used. Drop the view, and redefine it to use the current schema.

358 Must close current database before CREATE, START or ROLLFORWARD.

These statements choose a new current database, but the present database must be closed first. Use the CLOSE DATABASE statement before this statement.

359 Cannot drop current database.

The database that is currently open cannot be dropped. First use the CLOSE DATABASE statement; then you can drop it.

360 Cannot modify table or view used in subquery.

The UPDATE, INSERT, or DELETE statement uses data taken from the same table in a subquery. This action is not allowed because of the danger of getting into an endless loop. Select the input data into a temporary table first, and then refer to the temporary table in the UPDATE or INSERT statement.

361 Column size too large.

This internal error reflects a communications problem between the database server and the application. You should not see this error. If the error recurs, please note all circumstances and contact Informix Technical Support.

362 Can have only one column of serial/serial8 type.

A table can have at most only one column of type SERIAL and one column of type SERIAL8. You are attempting to add a second column of type SERIAL or SERIAL8, or you are attempting to create a table with more than one column of either type. If you intended to have a foreign key (that is, a column that refers to a SERIAL or SERIAL8 column in a different table), the data type of the column in this table should be
INTEGER or INTEGER8
Can have only one column of serial type.
Only one SERIAL column can exist in a table. This CREATE TABLE statement specifies two or more. Review the statement, and remove all but one of the columns with SERIAL data type. If you intended to have a foreign key (that is, a column that refers to a SERIAL column in a different table), the data type of the column in this table should be INTEGER.

363 CURSOR not on SELECT statement.

The cursor named in this statement (probably an OPEN) has been associated with a prepared statement that is not a SELECT statement. Review the program logic, especially the DECLARE for the cursor, the statement id specified in it, and the PREPARE that set up that statement. If you intended to use a cursor with an INSERT statement, you can only do that when the INSERT statement is written as part of the DECLARE statement. If you intended to execute an SQL statement, do that directly with the EXECUTE statement, not indirectly through a cursor.
This error is also returned when you attempt to associate a cursor with a SELECTINTO TEMP statement. Because of the INTO TEMP clause, the SELECT statement can return no rows and so cannot be used with a cursor.

364 Column column-name not declared for UPDATE OF.

This UPDATE…WHERE CURRENT OF cursor-name statement refers to at least one column that does not appear in the FOR UPDATE OF clause of the DECLARE statement that declared the cursor. Since specific columns were listed in the cursor declaration, the database server will not allow others to be updated. Review the declaration and the uses of this cursor. Perhaps the noted column, and others, should be added to the declaration, or perhaps the OF clause should be dropped, allowing the cursor to update any column in the table.

365 Cursor must be on simple SELECT for FOR UPDATE.

The cursor named in this statement (probably an OPEN statement) was declared with the FOR UPDATE clause. However, it has been associated with a SELECT statement that joins two or more tables or that uses UNIQUE, DISTINCT, GROUP BY, or UNION. Such a SELECT statement cannot be used in an update; there is no way to distribute the new data back into the multiple tables.
Review the declaration of the cursor. If it is declared FOR statement id, also review the PREPARE statement that set up that statement. You might need two cursors, one for general queries and another specifically for updating.

366 The scale exceeds the maximum precision specified.

A problem exists with the precision or scale of a DECIMAL or a MONEY data type in this statement. Review all uses of these types. The first should be declared as DECIMAL(p) or DECIMAL(p,s) where p, the precision (total number of digits) is between 1 and 32, and s, the scale (number of digits to the right of the decimal point) is no greater than p. The MONEY type follows the same rules.

367 Sums and averages cannot be computed for character columns.

This statement contains a use of the SUM or AVG function applied to a column that has a character data type (CHAR or VARCHAR). If you did not intend to take the sum or average of character strings, review the spelling of column names against the table definition. If a character column actually contains numeric values in character form, you can trick the database server (Version 4.0 and later) into performing an automatic conversion. Instead of applying the function to the column name alone, apply it to the expression in parentheses (column+0).

368 Incompatible sqlexec module.

The version of the database server does not agree with the version of the database library routines in the application program. This incompatibility must be resolved before the program can be executed. The database server is selected through the SQLEXEC environment variable (for database server versions prior to 6.0). It contains a complete pathname to the database server code, which is usually named sqlexec or sqlturbo (for database server versions prior to 6.0). The access routines linked into the program were chosen when the program was compiled. If the program you are running was supplied by Informix, then it or another Informix product might have been installed incorrectly.

369 Invalid serial number. Please consult your installation instructions.

Some error has been made in the installation of your Informix product(s). Check the value in the SQLEXEC environment variable (for database server versions prior to 6.0) and INFORMIXDIR environment variable; then consult the person who installed the software, and review the installation instructions.

370 Cannot drop last column.

This ALTER TABLE DROP statement would drop every column from the table. At least one column must be retained. Revise the statement to leave one column. Or if you do not want the table at all, use DROP TABLE to remove it.

371 Cannot create unique index on column with duplicate data.

This CREATE UNIQUE INDEX statement cannot be completed because the column (or columns) contains one or more duplicate rows. You can either create an ordinary index, accepting the duplicate values, or you can modify the table to remove the duplicates. To get a list of the duplicate values in a single column, first create the ordinary index. Then use a SELECT statement such as the following, filling in the table and column names:
SELECT column FROM table main WHERE 1 < ( SELECT COUNT(*) FROM table sub WHERE main.column = sub.column )
This statement can be extended to handle the case of multiple columns using AND.

372 Cannot alter table with audit trail on.

Once an audit trail has been started for a table, the table should not be altered. If you must alter the table, do the following. Copy the table to a backup medium. Use DROP AUDIT to remove the audit trail. Delete the audit-trail file. Alter the table. Again, copy the table to a backup medium. Finally, use CREATE AUDIT to start a new audit trail. The first backup is needed to restore the table if a failure occurs while the table is being altered (a lengthy, disk-intensive procedure if the table is large). The second backup is required because, if the table has to be recovered later, the new audit trail must be applied against a backup that has the same layout of columns.

373 DBPATH too long.

While the database server was trying to locate a database using the DBPATH environment variable, it constructed a full-path string that exceeds its limit of 80 characters. A limit exists on the length of one complete database directory pathname, from the starting slash or backslash through the .dbs suffix. You will have to locate your databases higher up in the directory hierarchy in order to use them. (The message text is misleading; there is no specific limit on the total length of the contents of DBPATH.)

374 Can only use column number in ORDER BY clause with UNION.

This query has both a UNION clause and an ORDER BY clause. In a union query, in which multiple SELECT statements exist and the names of the selected columns in each statement are not necessarily the same, you cannot use column names or expressions in the ORDER BY clause.
Instead, you must use column position numbers, with 1 representing the first selected column, 2 representing the second, and so on. Rewrite the query to use only numbers in the ORDER BY clause.

375 Cannot create log file for transaction.

While the database server was trying to execute a START statement, it got an unexpected error in trying to create the transaction-log file. Check the accompanying ISAM error code for more detailed information on the cause. Typical causes include a shortage of disk space, file permission problems, or a limit on the number of open files.

376 Log file already exists.

The transaction log file you specify in the WITH LOG IN clause must not already exist. The database server must start a log file fresh; it has no means of appending log data to an old log file. An existing log file contains recovery information that may be crucial, so it will not simply empty an existing file. To make a full backup, lock the database, copy all of the database directory to a backup medium, erase the log file (it is no longer needed), and use the START DATABASE statement. To make a partial backup, lock the database, copy the log file to a backup medium and store it with the full backup, erase or rename the log file, and use the START DATABASE statement.

377 Must terminate transaction before closing database.

This statement (DATABASE, CREATE DATABASE, or CLOSE DATABASE) cannot be executed until the current transaction is finished.
Use either COMMIT WORK or ROLLBACK WORK and then close the database.
If you export a database and then import it, large-object handles (for images) will be different after you import the database.
Therefore, if you use static html references for images and export the database and then import it, you will have to determine the new large-object handle for each static html reference.

378 Record currently locked by another user.

A row of a table that this statement needs is not accessible because it has been locked. Check the accompanying ISAM error code for more detailed information. It will probably be -107, -113, -134, -143, -144, or -154. Each notes a slightly different relationship between your program and the other user’s program. You can prevent most, but not all, occurrences of this error with SET LOCK MODE TO WAIT.
For database servers prior to Version 4.1, this error message is produced in conjunction with the UPDATE and the DELETE WHERE CURRENT OF statements only. In Version 6.0, this error message is no longer used.

379 Cannot revoke privilege on columns.

In the GRANT statement, you can grant UPDATE or SELECT privilege on specific columns. However, the REVOKE statement accepts only the keywords for the type of privilege; you cannot revoke access to specific columns. If you want to change the columns allowed to a certain user, you must first REVOKE the privilege in full, then GRANT it on the new list of columns.

380 Cannot erase log file.

The database server, while trying to initialize a transaction log file, received an unexpected error. Check the accompanying ISAM error code for more detailed information on the cause. Typical causes include hardware errors and file permission problems.

381 Cannot grant to someone who has granted you the same privilege before.

The privilege you are trying to grant is one that was first granted to you WITH GRANT OPTION. The user who made that grant is among the list of users in this present statement. For security reasons, you may not do a reciprocal grant. Rewrite the statement leaving out the name of your original patron. To see a list of the users to whom you may not grant, query systabauth as follows:
SELECT grantor FROM systabauth WHERE grantee = USER

382 Same number of columns must be specified for view and select clause.

In this VIEW statement, you have listed the names of the columns of the view. However, their number is different from the number of columns in the SELECT statement for the view. Check the punctuation of the two lists, and make sure that you have supplied a name for each item in the select list.

383 Need to specify view column names in the view definition.

In this VIEW statement, you have not listed specific names for columns. That action is allowed when the SELECT statement selects only simple, named columns. However, the SELECT statement here selects one or more expressions. You must give names to these columns in a parenthesized list that follows the name of the view. Because you cannot give names for only some of the columns, you must list names for all.

384 Cannot modify non simple view.

This statement attempts to modify (insert, delete, or update) rows in a view which does not have an appropriate INSTEAD OF trigger defined. Starting with version 9.40, you can define an INSTEAD OF trigger on a view.
Without an INSTEAD OF trigger, this view is not modifiable because it is based on a SELECT statement that joins two or more tables or that selects calculated values or literal values. (You can DELETE from a view that selects from a single table even if some calculated values are selected.) You will have to direct the statement against the actual table(s) on which the view is based or you can define an INSTEAD OF trigger on the view to make it modifiable.

385 Data value out of range.

This statement attempts to put data into a view that was defined WITH CHECK OPTION, so new data has to satisfy the tests in the WHERE clause in the view. However, one or more of the data values in this current statement does not meet that test, so the alteration was not performed. Roll back the current transaction. To see what tests new data must satisfy, display the definition of the view, as follows:
SELECT seqno, viewtext FROM sysviews, systables WHERE systables.tabname = ‘viewname’ AND systables.tabid = sysviews.tabid ORDER BY seqno

386 Column contains null values.

This ALTER TABLE statement contains a MODIFY clause that assigns the NOT NULL attribute to an existing column. However, that column already contains one or more null values. The modification cannot be made until the null values have been deleted or updated to some nonnull value.

387 No connect permission.

You cannot access the database that this statement requests because you have not been granted CONNECT privilege to it. Contact a person who has Database Administrator privilege to that database and ask to be granted CONNECT privileges to it.

388 No resource permission.

If you issued a CREATE TABLE, CREATE INDEX, or CREATE PROCEDURE statement, you cannot execute this statement because your account has not been granted the RESOURCE privilege for this database. You need the RESOURCE privilege to create permanent tables, indexes on permanent tables, and procedures.
If you issued a SET statement, START VIOLATIONS TABLE statement, or STOP VIOLATIONS TABLE statement, you cannot execute this statement because your account has not been granted the RESOURCE privilege for this database. You need the RESOURCE privilege to execute the SET statement for a constraint, trigger, or index defined on a table in the current database. You also need the RESOURCE privilege to execute the START VIOLATIONS TABLE or STOP VIOLATIONS TABLE statement on a base table in the current database.
To recover from this error, contact a person who has the DBA privilege on this database and ask to be granted the RESOURCE privilege for the database.
No resource permission.
If you issued a CREATE DATABASE statement in an 8.32 database server, you cannot execute this statement because you are not in the group specified in the ONCONFIG file parameter DBCREATE_GRP.
To be included in the operating system group specified in DBCREATE_GRP, see your system administrator.

389 No DBA permission.

This statement cannot be executed because you have not been granted DBA privilege for this database. Contact a person who has DBA privilege for the database and ask to be granted DBA privilege (or simply ask to have this statement executed for you).
It is also possible that you received this message because you tried to register a user-defined routine that is written in a language for which you do not have usage privilege. If you do not have usage privilege for the language, ask one of the following users to grant this privilege to you: user informix or another user who has been granted the privilege with the option to grant the privilege to other users.

390 Synonym already used as table name or synonym.

This CREATE SYNONYM statement names a synonym that is already in use. To see all the synonym and table names currently defined, query systables as follows:
SELECT tabname, owner FROM systables WHERE tabid > 99

391 Cannot insert a null into column column-name.

This statement tries to put a null value in the noted column. However, that column has been defined as NOT NULL. Roll back the current transaction. If this is a program, review the definition of the table, and change the program logic to not use null values for columns that cannot accept them.

392 System error – unexpected null pointer encountered.

This internal error should not occur. If the error recurs, please note all circumstances and contact Informix Technical Support.
A condition in the where clause results in a two-sided outer join.
This query requests an outer join, but one or more conditions in the WHERE clause interfere with the dominant-subordinate relationships between the joined tables in the FROM clause.
Review the query, and verify that every condition that relates the joined tables is actually necessary and semantically correct.
If an expression in the WHERE clause relates two subordinate tables, you must use parentheses around the joined tables in the FROM clause to enforce dominant-subordinate relationships. (Note: You cannot put a parenthesis directly after the FROM keyword.) The following example successfully returns a result:
SELECT c.company, o.order_date, i.total_price, m.manu_name
FROM customer c, OUTER (orders o, OUTER (items i, OUTER manufact m))
WHERE c.customer_num = o.customer_num AND o.order_num = i.order_num AND i.manu_code = m.manu_code;
If you omit parentheses around the subordinate tables in the FROM clause, you must establish join conditions, or relationships, between the dominant table and each subordinate table in the WHERE clause. If a join condition is between two subordinate tables, the query will fail. The following example successfully returns a result:
SELECT c.company, o.order_date, c2.call_descr
FROM customer c, OUTER orders o, OUTER cust_calls c2
WHERE c.customer_num = o.customer_num
AND c.customer_num = c2.customer_num;
Consider using the ANSI-SQL standard syntax for outer joins. For more information, refer to the Informix Guide to SQL: Syntax.

393

394 View view-name not found.

The named view cannot be dropped as it does not exist. To see names of existing views, query systables as follows:
SELECT tabname FROM systables WHERE tabtype = ‘V’
The where clause contains an outer cartesian product.
This query requests an outer join, but either the WHERE clause is missing in the query, or the conditions in the WHERE clause cause every row of the subordinate table to be selected for every row of the dominant table, resulting in a very large output.
Review the query, and check that at least one condition in the WHERE clause relates each dominant-subordinate pair of tables in the query.

395

396

Illegal join between a nested outer table and a preserved table.
This query requests an outer join, but the WHERE clause contains a condition that relates a nested subservient table to a preserved table that is not its immediate parent. This action is not supported. Review the query, and check that every condition that relates two tables is between a preserved table and its immediately subordinate table.

397

System catalog corrupted.
This internal error should not occur. The database server has encountered something in one or more of the system catalog tables that violates integrity constraints.
Run the oncheck utility if you are using Informix Dynamic Server, INFORMIX-Universal Server, or INFORMIX-OnLine Dynamic Server. Run bcheck or secheck if you are using the INFORMIX-SE database server. Run tbcheck if you are using the INFORMIX-OnLine database server. If the error recurs, note all circumstances and contact Informix Technical Support.

398

Cursor manipulation must be within a transaction.
An attempt to use an UPDATE or a DELETE WHERE CURRENT OF statement produces this error message. This statement would modify a table through a cursor. However, this database uses a transaction log. When that is the case, modifications made through a cursor must be placed within the bounds of a transaction.
Review the program logic, and check that it executes a BEGIN WORK statement prior to this statement and that it ends the transaction at some reasonable point. If the program has to work with both databases that use transactions and those that do not, you can have it check the second element of the sqlwarn array of the SQL Communications Area. This area will contain the letter W after a DATABASE statement if the database has a transaction log, and a space if it does not.

399 Cannot access log file.

This query refers to a table named syslog. A row in the systables catalog has syslog in the tabname column, but it is only a convenient place to store the pathname to the transaction-log file.
Under INFORMIX-SE, a table named syslog cannot exist in a database with logging. (In general, you should avoid table names that start with sys-, and syslog is not allowed.)