How to concatenate multiple columns in a DB2 select statement to return a single column

Use “||” like so…

SELECT LastName||', '||FirstName 
FROM [schema].[table]

If one of the columns is numeric you’ll probably want to convert to CHAR and TRIM like so…

SELECT LastName||', '||FirstName||' - '||TRIM(CHAR(EmplId))
FROM [schema].[table]
Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon 🙂

You or someone you know looking to buy or sell?

2 thoughts on “How to concatenate multiple columns in a DB2 select statement to return a single column”

Leave a Reply