Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 21 22 23 24 25 26 < 27 > 28 29 30 31 32 33 .. 241 >> Next


In response to a query that does not define a TITLE phrase, such as:

SELECT Last_Name, First_Name FROM SalesReps ORDER BY Last_Name ;

the column names are returned exactly as defined; for example, Last_ Name, then First_Name. The TITLE phrase can be used either in the column definition, or in a statement to specify the case, wording, and placement of an output column heading.

4-4

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Lexicon

Japanese Character Names

Introduction

Cross-Platform Integrity

Calculating the Length of a Name

Japanese Character Names

For a Japanese character site, a name is a string that conforms to the following rules:

• The length may be from 1 to 30 bytes.

• The contents also may include the following:

• Uppercase and lowercase simple Latin letters (A...Z, a...z) in single byte and multibyte forms.

• Digits (0-9) in single byte and multibyte forms.

These cannot appear as the first character in the string.

• The special characters $ (dollar sign), # (number sign), and _ (underscore) in single byte and multibyte forms.

• Katakana characters and sound marks in single byte and multibyte forms.

• Hiragana characters.

• Kanji ideographs from JIS-x0208.

Note that the Teradata RDBMS uses canonical representations for simple Latin letters, digits, the symbols $, #, and _.

Katakana characters can be shared between Kanji EBCDIC and KanjiShift-JIS clients.

JIS-x0208 characters can be shared between KanjiEUC and KanjiShift-JIS clients.

It is the responsibility of the user to ensure cross-platform integrity where desired.

Note: Comparison between multibyte characters is always CASESPECIFIC. For future compatibility, use the CASESPECIFIC option to define all columns with a data type of CHAR, VARCHAR, or LONG VARCHAR.

The length of a name is measured by the physical bytes of its internal representation, not by the number of visual characters. (Note that under the KanjiEBCDIC character sets, the Shift-Out and Shift-In characters that delimit an multibyte character string are included in the byte count.)

Teradata RDBMS for UNIX SQL Reference

4-5
Teradata SQL Lexicon

Japanese Character Names

For example, the following table name contains six logical characters of mixed single byte characters/multibyte characters, defined during a KanjiEBCDIC session:

<TAB1>QR

All single byte characters, including the Shift-Out/Shift-In characters, are translated into the Teradata RDBMS internal encoding, based on JIS-x0201 (Figure H-1 defines the single byte portion for internal storage of KanjiEBCDIC). Under the KanjiEBCDIC character sets, all multibyte characters remain in the client encoding.

Thus, the processed name is stored as a string of twelve bytes, padded on the right with the single byte space character to a total of 30 bytes.

The internal representation is as follows:

0E 42E3 42C1 42C2 42F1 0F 51 52 20 20 20 20 20 20 20 20 20 20 20 20 . . .

< TA B 1 > Q R

To ensure upgrade compatibility, an object name created under one character set should not exceed 30 bytes after conversion to the encoding of another character set.

When you create objects from one Kanji character set, ensure that the object name can be converted to any other Kanji character set without exceeding 30 bytes in the internal encoding for that character set.

For example, a single Katakana character occupies 1 byte in KanjiShift-JIS. However, when KanjiShift-JIS is converted to KanjiEUC, each Katakana character occupies two bytes. Thus, a 30-byte Katakana name in KanjiShift-JIS would expand in KanjiEUC to 60 bytes, which is illegal.

The formula for calculating the correct length of an object name is as follows:

Len = ASCII + (2*KANJI)

+ MAX(2*KATAKANA, (KATAKANA + 2*S2M + 2*M2S))

where:

This variable . . . Represents the number of . . .
ASCII single byte ASCII characters in the name.
KATAKANA single byte Hankaku Katakana characters in the name.
Kanji double byte characters in the name from the JIS-x0208 standard.
S2M transitions from ASCII, or KATAKANA, to JIS-x0208.
M2S transitions from JIS-x0208 to ASCII or KATAKANA.

4-6

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Lexicon

Japanese Character Object Names

Japanese Character Object Names

An object name cannot contain any of the following:

Introduction

• Multibyte spaces.

• Symbols other than $ (dollar sign), # (number sign), or _ (underscore) in single byte or multibyte forms.

• Digits (0-9) in single byte or multibyte forms when they are the first character in the name.

• Greek and Cyrillic characters.

• User-defined characters.

When creating object names, additional restrictions apply under each type of character set, as discussed in the following passages.

Charts of the supported Kanji character sets, the Teradata RDBMS internal JIS encodings, the valid character ranges for Kanji object names and data, and the invalid character ranges for Kanji data are given in Appendix H, “Japanese Character Sets.” The non-valid character ranges for Kanji object names are given in Chapter I, “Non-valid Japanese Character Code.”
Previous << 1 .. 21 22 23 24 25 26 < 27 > 28 29 30 31 32 33 .. 241 >> Next