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 .. 25 26 27 28 29 30 < 31 > 32 33 34 35 36 37 .. 241 >> Next


(Note that the first name, <double byte A>, cannot be interpreted. To obtain a printable version of a name, log onto a session under the same character set under which the name was created.)

You can use the same syntax to obtain the internal hexadecimal Example 2 4 representations of all views or all macros. To do this, modify the

WHERE condition to TableKind=’V’ for views and to TableKind=’M’ for macros.

To obtain the internal hexadecimal representation of all database names, you can issue the following statement:

SELECT

4-18

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Lexicon

Finding the Internal Hexadecimal Representation of a Name

CHAR2HEXINT(D.DatabaseName)

(TITLE 'Internal Hex Representation of DatabaseName')

, D.DatabaseName (TITLE 'DatabaseName')

FROM DBC.Databases D ORDER BY D.DatabaseName;

This statement selects every DatabaseName from DBC.Databases. For each DatabaseName, it returns the internal hexadecimal representation and the name in character format, sorted by DatabaseName.

An example of the output from this statement is as follows:

Internal Hex Representation of DatabaseName DatabaseName

416C6C202020202020202020202020202020202020202020202020202020

434F4E534F4C452020202020202020202020202020202020202020202020

437261736864756D70732020202020202020202020202020202020202020

444243202020202020202020202020202020202020202020202020202020

44656661756C742020202020202020202020202020202020202020202020

5055424C4943202020202020202020202020202020202020202020202020

53797341646D696E20202020202020202020202020202020202020202020

53797374656D466520202020202020202020202020202020202020202020

All

CONSOLE

Crashdumps

DBC

Default

PUBLIC

SysAdmin

SystemFe

Note that these statements return the padded hexadecimal name; Example 3 4 the value 0x20 represents a space character in the internal

representation. You can use the TRIM function to obtain the hexadecimal values without the trailing spaces, as follows:

SELECT

CHAR2HEXINT(TRIM(T.TableName))

(TITLE 'Internal Hex Representation of TableName')

, T.TableName (TITLE 'TableName')

FROM DBC.Tables T WHERE T.TableKind = 'T'

ORDER BY T.TableName;

Teradata RDBMS for UNIX SQL Reference

4-19
Teradata SQL Lexicon

Specifying Names in a Logon String

Specifying Names in a Logon String

The Teradata RDBMS logon string consists of the following:

----tdpid/username —³--------1—³-------------1----------------

'-,password-I '-,accountname-^

HH01A079

The username, password, and accountname parameters may contain mixed single byte characters/multibyte characters, as determined by the current character set.

Note: The Teradata RDBMS does not support the hexadecimal representation of a username, a password, or an accountid in a logon string. For example, if you attempt to log on as user DBC by entering ‘444243’XN, the logon will be unsuccessful and an error message will be generated.

Note: The password format options allows the site administrator to change the minimum and maximum number of characters allowed in the password string, and control the use of digits and special characters. For allowed password strings refer to the previous section “Object Names ( (Japanese Character) Rules.

The password string rules are identical to those for naming objects.

When creating passwords, additional restrictions apply under each type of character set.

The password formatting feature does not apply to multibyte character sets.

Charts of supported Kanji character sets, the Teradata RDBMS internal JIS encodings, the valid characters ranges for Kanji object names and data, and the invalid character ranges for Kanji data are given in Appendix H, “Japanese Character Sets” and Appendix I, “Non-valid Japanese Character Code.”.

4-20

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Lexicon Keywords

Introduction

Keywords Are Reserved Words

Keywords

Keywords are words that are reserved for use in SQL statements; they cannot be used as object names.

The first keyword in a SQL statement is usually a verb; for example, in the INSERT statement, the first keyword is INSERT. Other keywords appear throughout a statement as modifiers (for example, DISTINCT, PERMANENT), or as words that introduce clauses (for example, IN, AS, AND, TO, WHERE).

In this manual, keywords are shown entirely in uppercase letters. Although SQL does not discriminate between uppercase and lowercase letters in a keyword.

For example, the following SELECT statements are considered to be identical:

Select Salary from Employee where EmpNo = 10005;

SELECT Salary FROM Employee WHERE EmpNo = 10005;

select Salary FRom Employee WherE EmpNo = 10005;

Refer to Appendix A for a list of Teradata SQL keywords.

Note: Double byte Roman characters may not be used in keywords.

Note: Entry-level ANSI requires that all keywords be expressed as uppercase. If the SQL flagger is turned on, then lowercase keywords are flagged.
Previous << 1 .. 25 26 27 28 29 30 < 31 > 32 33 34 35 36 37 .. 241 >> Next