17.10 - Examples - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

Example: UPPERCASE Phrase

The Gender column is created using the UPPERCASE option.

Gender CHAR UPPERCASE

If Gender data is entered in lowercase as shown in the following INSERT statement, then it is stored and returned in uppercase.

INSERT INTO Employee (Name, EmpNo, Gender ...
 VALUES ('Smith', 10021, 'f', ...);
   
SELECT Gender
FROM Employee;
   Gender
   F

Example: UPPERCASE Phrase With the Concatenation Operator

If used with the concatenation (||) operator, UC must be enclosed in parentheses, and be placed immediately after the column name.

SELECT (City_name (UC)) || ', ' || State, Population
FROM World
WHERE Country = 'USA'
ORDER BY Population ;