SQL Reference Guide > SQL Reference Guide > E. Terminal Monitor > Terminal Monitor Character Input and Output
Was this helpful?
Terminal Monitor Character Input and Output
When non-printable ASCII characters are entered through the Terminal Monitor, the Terminal Monitor replaces these characters with blanks.
For example, if you enter the statement:
INSERT INTO test VALUES(’^La’)
the Terminal Monitor converts the ^L to a blank before sending it to the DBMS Server, and then displays the message:
Non-printing character nnn converted to blank
where nnn is replaced with the actual character.
To insert non-printing data into a char or varchar field, specify the data as a hexadecimal value. For example:
INSERT INTO test VALUES(x’07’);
This feature can be used to insert a newline character into a column:
INSERT INTO test VALUES(’Hello world’+x’0a’);
This statement inserts ’Hello world\n’ into the test table.
On output, if the data type is char or varchar, any binary data are shown as octal numbers (\000, \035, and so on.). To avoid ambiguity, any backslashes present in data of the char or varchar type are displayed as double backslashes. For example, if you insert the following into the test table:
INSERT INTO test VALUES(’\aa’)
when you retrieve that value, you see:
\\aa
Note:  The backslash in data of the Ingres C type is not doubled.
Last modified date: 08/29/2024