Enabling Delimited Identifiers

About this task

To use delimited identifiers, you must set the DELIMIDENT environment variable. While DELIMIDENTis set, strings enclosed in double quotation marks ( " ) are treated as identifiers of database objects, and strings enclosed in single quotation marks ( ' ) are treated as literal strings. If the DELIMIDENT environment variable is not set, however, strings enclosed in double quotation marks are also treated as literal strings.

If DELIMIDENT is set, the SELECT statement in the following example must be in single quotation marks in order to be treated as a quoted string:
PREPARE ... FROM 'SELECT * FROM customer';

If a delimited identifier is used in the SELECT statement that defines a view, then the DELIMIDENT environment variable must be set in order for the view to be accessed, even if the view name itself contains no special characters.

On UNIX and Linux systems, you can set DELIMIDENT by the procedures for setting environment variables that are described in Informix® Guide to SQL: Reference.

On Windows systems, you can set DELIMIDENT in various ways, which generally have the following descending order of precedence:
  1. The setting of DELIMIDENT in the connection string when connecting
  2. The setting of the SQL_INFX_ATTR_DELIMIDENT connection attribute before connecting
  3. The setting of DELIMIDENT in setnet32 with the Use my settings box selected
  4. The setting of DELIMIDENT in setnet32 with the Use my settings box cleared
  5. The setting of DELIMIDENT on the command line before running the application
  6. The setting of DELIMIDENT in Windows as a user variable
  7. The setting of DELIMIDENT in Windows as a system variable
  8. The default value (of no support for delimited identifiers).
This general order of precedence for Windows clients is sensitive, however, to the API through which you connect to the database, which can also affect the meaning of the setting and the default value. Refer to the documentation of your specific API for more information about the DELIMIDENT setting in Windows.