16.20 - Equality Comparison - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2020-03-25
dita:mapPath
xzf1512079057909.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
kby1472250656485

Comparison of character strings, which can contain mixed single byte and multibyte character data, is handled as follows:

  • If expression_1 and expression_2 have different server character sets, then they are converted to the same type. For details, see "Implicit Character-to-Character Translation" in Teradata Vantage™ Data Types and Literals, B035-1143.
  • If expression_1 and expression_2 are of different lengths, the shorter string is padded with enough pad characters to make both the same length.
  • Session mode is identified:
    In this mode … The default case specification for a character string is …
    ANSI CASESPECIFIC.
    Teradata NOT CASESPECIFIC.

    Unless the CASESPECIFIC phrase 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.

  • Case specification is determined:
    IF … THEN the comparison is …
    either argument is CASESPECIFIC case specific.
    both arguments are NOT CASESPECIFIC case blind.
  • Trailing pad characters are ignored.