In SQL 2012 (and later) it is now easier for me with CONCAT (also better performance )
SELECT CONCAT(@ID, '.', @Number)
any NULL elements are converted to empty lines, preventing the spread of NULL, which eliminates the need to make even more complex:
SELECT ISNULL(CAST(@ID AS VARCHAR(10) ), '') +'.'+ ISNULL(CAST(@Number AS VARCHAR(10) ) , '')
source share