Data types you can use with DBCS data
You can save DBCS data in your database if you define the columns in which
you save the data as character or graphic. Whether you save your DBCS data
in character or graphic columns depends on your needs:
- If the column contains DBCS data strings and SBCS data strings, or if
it contains a string with both DBCS and SBCS data, define the column as character.
- If the column contains only DBCS data, define the column as character
if the SO and SI delimiters must be saved in the database with the double-byte
characters. Otherwise, define the column as graphic.
Specifically, QMF can save DBCS data in database columns that are defined
as these data types:
- Character
- DBCS data, when preceded and followed by single-byte single quotation
marks, can appear in columns with a character data type. QMF also allows DBCS
data strings that are mixed with SBCS data strings. Use this data type if
all entries in the column have the same length, up to a maximum of 126 double-byte
characters.
- Graphic
- QMF can put only DBCS data of fixed length into columns that are defined
as graphic data type. Use this data type if all entries in the column have
the same length, up to a maximum of 127 double-byte characters.
- Variable character
- Use this for variable-length entries of up to 126 double-byte characters.
DBCS data, when preceded and followed by single-byte, single quotation marks,
can appear in columns with a variable data type. QMF also allows DBCS data
strings that are mixed with SBCS data strings.
In DB2, variable character
data can exceed 126 characters. When variable character data exceeds 126 characters,
it is handled like the LONG VARCHAR data type.
- Variable graphic
- QMF can put only DBCS data of variable length up to 127 characters into
a column that is defined as VARGRAPHIC data type.
- Long variable character
- Use this data type with caution. LONG VARCHAR can be up to 16,382 double-byte
characters long. QMF has restrictions for how you can use a column with LONG
VARCHAR in a query. You cannot use it as follows:
- In search conditions
- In sorting
- With COUNT, GROUP BY, or UNION
- In indexes
- In subqueries
- In inserting or updating queries (the value must be set to NULL)
- Long variable graphic
- QMF can put only DBCS data of variable length up to 16,383 characters
into a column that is defined as LONG VARGRAPHIC data type. Use this data
type with caution. The restrictions for how you can use a column with this
data type in a query are the same as for the long variable character data
type.
[ Previous Page | Next Page | Contents | Index ]