Concatenation Operator Examples | Teradata Vantage - Example: Using Concatenation to Create More Readable Results - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantageā„¢

Literals, spaces, and the TITLE phrase can be included in the operation definition to format the result heading and improve readability.

For example, the following definition returns side titles, evenly spaced result strings, and a blank heading.

   SELECT ('Sex ' || sex ||', Marital Status ' || mstat)(TITLE ' ')
   FROM Employee ;
   
   Sex M, Marital Status S 
   Sex F, Marital Status M 
   Sex M, Marital Status M 
   Sex F, Marital Status M 
   Sex F, Marital Status M 
   Sex M, Marital Status M 
   Sex F, Marital Status W
      ...