Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » SQL Anywhere Administration Tools » Interactive SQL » Interactive SQL options

isql_command_timing option [Interactive SQL] Next Page

isql_escape_character option [Interactive SQL]


Function

Controls the escape character used in place of unprintable characters in data exported to ASCII files.

Allowed values

Any single character

Default

A backslash ( \ )

Description

When Interactive SQL exports strings that contain unprintable characters (such as a carriage return), it converts each unprintable character into a hexadecimal format and precedes it with an escape character. The character you specify for this setting is used in the output if your OUTPUT statement does not contain an ESCAPE CHARACTER clause. This setting is used only if you are exporting to an ASCII file.

See also
Example

Create a table that contains one string value with an embedded carriage return (denoted by the "\n" in the INSERT statement). Then export the data to c:\escape.txt with a # sign as the escape character.

CREATE TABLE escape_test( text varchar(10 ) );
INSERT INTO escape_test VALUES( 'one\ntwo' );
SET OPTION isql_escape_character='#';
SELECT * FROM escape_test;
OUTPUT TO c:\escape.txt FORMAT ASCII;

This code places the following data in escape.txt:

'one#x0Atwo'

The pound sign (#) is the escape character and x0A is the hexadecimal equivalent of the \n character.

The start and end characters (in this case, single quotation marks) depend on the isql_quote setting.