Example: Concatenating First Name With Last Name

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

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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