Equality Comparison - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantage™

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.