Example: Querying for Case-Specific Names - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Consider the following query:

   SELECT * 
   FROM STUDENTS 
   WHERE Firstname = 'George';

The behavior of the comparison Firstname = 'George' under different case specification attributes and session modes is described in the table that follows.

Firstname Behavior
CASESPECIFIC
  • If the session mode is ANSI, then ‘George’ is CASESPECIFIC and the match succeeds for rows with Firstname containing ‘George’.
  • If the session mode is Teradata, then “George’ is NOT CASESPECIFIC and the match succeeds for rows with Firstname containing ‘George’.

When either character sting is CASESPECIFIC, the comparison is case specific.

NOT CASESPECIFIC
  • If the session mode is ANSI, then ‘George’ is CASESPECIFIC and the match succeeds for rows with Firstname containing ‘George’. When either character string is CASESPECIFIC, the comparison is case specific.
  • If the session mode is Teradata, then ‘George’ is NOT CASESPECIFIC and the match succeeds for rows with Firstname containing any combination of cases that spell the name George, such as ‘george’ or ‘GEORGE’ or ‘George’. When both character strings are NOT CASESPECIFIC, the comparison is case blind.