The server character sets LATIN, UNICODE, and GRAPHIC are declared within Teradata SQL as strings of characters.
Within a client environment, those character data types are expected to be specified as strings of physical bytes rather than as characters.
For example, within client application programs, space is allocated in terms of bytes, the layout of the import files for data loading utilities is expressed in terms of bytes, and so on.
To provide a reasonable bridge between characters in SQL declarations and physical bytes in client environments, clients can specify character strings in bytes even though the destination columns are declared as characters.
Whenever a client is informed about the length of the character expression (as in the HELP COLUMN statement, response parcels, and so on), Vantage specifies the length in terms of physical bytes.
General Rules for Server Character Set Declarations
- The length of a character type is declared in terms of bytes or characters, depending on the server character set.
Server Character Set How Type is Defined - LATIN
- UNICODE
- GRAPHIC
In characters - KANJI1
- KANJISJIS
In bytes - The length of the imported CHARACTER data described by a USING clause is in terms of bytes (the CHARACTER data description in the USING clause is in bytes). For more information, see Character Data Import Process.
- The definition of the character data in response and request parcels is in terms of bytes.
- Client Load (Teradata FastLoad and Teradata MultiLoad) and Export (Teradata FastExport) utilities use the MultiLoad and FastExport DEFINE or LAYOUT command to specify the layout of the file on the client.
The layout of CHARACTER data within the DEFINE command is in terms of bytes.
The layout of GRAPHIC data within the DEFINE command is in terms of characters. This layout is then translated into the response parcel or the USING clause for communication with Teradata SQL. For more information, see Character String Assignment and GRAPHIC Columns and CHARACTER and GRAPHIC Server Character Set Limitations for INSERT Operations.
Exported Character Data
Export width determines the appropriate number of characters or bytes to export for a client application. System-wide and user-defined export width tables define the export width of characters or bytes during export to a client. The values used for the export width are based on the active export width table, and the server character set and client character set used by the application.
The following table lists the system export width tables provided by Teradata:
Export Width Table Name | Export-ID | Description |
---|---|---|
Expected Default | 0 | Provides reasonable default widths for the character data type and client form of use. This is the initial default table. |
Compatibility Default | 1 | Enables Unicode data to be processed by applications that are written to process Latin or KANJI1 data. |
Maximum Default | 2 | Provides maximum default width of the character data type and client form of use. |
HELP Statements
The export width rules determine HELP TABLE and HELP COLUMN statement results.