17.10 - Example: Concatenating First Name With Last Name - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

Consider a table called names that contains last and first names columns, defined as VARCHAR, as listed here:

   lname         fname  
   ------------  ------------
   Ryan          Loretta
   Villegas      Arnando 
   Kanieski      Carol 
   Brown         Alan

Use string concatenation and a space separator to combine first and last names:

   SELECT fname ||' '|| lname 
   FROM names 
   ORDER BY lname ; 

The result is:

   ((fname||' ')||lname)
   Alan Brown 
   Carol Kanieski 
   Loretta Ryan 
   Arnando Villegas