Hexadecimal Strings
To specify a nonprintable character, you can use a hexadecimal string constant with the following format:
X|x'nn{nn}'
The introductory X identifies the string as a hexadecimal string constant. You need to specify the nonprintable character as two hexadecimal digits (nn) in the range 0‑9, a‑f, or A‑F, and the string must contain an even number of characters. There must be no intervening white space between the X and the single‑quoted string of hexadecimal digits. The X and the hexadecimal digits are case insensitive. Report-Writer interprets hexadecimal constants as data type varchar.
You can use hexadecimal string constants anywhere you use a string constant. Ingres translates the hexadecimal constant into its corresponding character value. The following example uses hexadecimal string constants in a .query statement:
.query
select binary_key, X'414243' as abc
from my_table
where binary_key = X'5A7B0034'
You can also use hexadecimal string constants as expressions in .print statements. Hexadecimal strings are intended for use primarily with the q0 format, which sends the string directly to the output device as is, without interpretation. Hexadecimal strings in .print statements
without the q0 format are interpreted by the formatting routines and can produce undesirable results or cause Report-Writer to fail. For more information on the q0 format, see
Control Character Format Q0.
QUEL User Notes
Hexadecimal string constants are not supported within QUEL .query statements.
Last modified date: 08/14/2024