Nonequality Comparison

Teradata Vantage™ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K
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.