Nonequality Comparison - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantage™
Nonequality comparisons are handled as follows:
  1. If expression_1 and expression_2are of different lengths, the shorter string is padded with enough pad characters to make both the same length.
  2. Session mode is identified.
    In this mode … The default case specification for a character string is …
    ANSI CASESPECIFIC.
    Teradata NOT CASESPECIFIC.

    Unless the CASESPECIFIC qualifier is applied to one or both of the expressions, any simple Latin letters in both expression_1 and expression_2 are converted to uppercase before comparison begins.

    To override the default case specification of a character expression, apply the CASESPECIFIC or NOT CASESPECIFIC phrase.

  3. Characters identified as single byte characters under the current character set are converted according to the collation sequence in effect for the session.
  4. For the KanjiEUC character set, the ss3 0x8F character is converted to 0xFF. This means that a user-defined KanjiEUC codeset 3 is not properly ordered with respect to other KanjiEUC code sets.

    The ordering of other KanjiEUC codesets is proper; that is, ordering is the same as the binary ordering on the client system.

  5. The prepared strings are compared and trailing pad characters are ignored.
Nonequality comparisons involve the collation in effect for the session. Five collations are available:
  • EBCDIC
  • ASCII
  • MULTINATIONAL
  • CHARSET_COLL
  • JIS_COLL

Collation can be set at the user level with the COLLATION option of the CREATE USER or MODIFY USER statements, and at the session level with the [[.]SET] SESSION COLLATION statement or the CLIv2 CHARSET call.

If the MULTINATIONAL collation sequence is in effect, the collation sequence of a Japanese language site is determined by the collation setting installed during start-up.