Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Data Types and Expressions > Quoted String >

Newline Characters in Quoted Strings

By default, the string constant must be written on a single line. That is, you cannot use embedded newline characters in a quoted string. You can, however, override this default behavior in one of two ways:

This enables newline characters in quoted strings for the current session:

EXECUTE PROCEDURE IFX_ALLOW_NEWLINE('T')

If newline characters in quoted strings are not enabled for a session, the following statement is invalid and returns an error:

SELECT 'The quick brown fox
   jumped over the old gray fence'
   FROM customer
   WHERE customer_num = 101

If you enable newline characters in quoted strings for the session, however, the statement in the preceding example is valid and executes successfully.

For more information on the IFX_ALLOW_NEWLINE function, see IFX_ALLOW_NEWLINE Function. For more information on the ALLOW_NEWLINE parameter in the ONCONFIG file, see your IBM Informix Administrator's Reference.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]