select CASE WHEN FirstColumn IS NULL THEN '' ELSE FirstColumn END + ' ' +
CASE WHEN SecondColumn IS NULL THEN '' ELSE SecondColumn END as ResultColumn
from myTable

That works. Also there is TSQL's ISNULL function.

SELECT 
    ISNULL(FirstColumn, '') + ' ' + ISNULL(SecondColumn, '') AS ResultColumn
FROM 
    mytable

Yeah there is also COALESCE(columnName,'')

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.