Would something like this example work for you? I didn't quite understand what you meant by "exceptions as to why the function doesn't execute".CREATE TABLE #tmp (firstname VARCHAR(32), lastname VARCHAR(32), middleinitial VARCHAR(1));INSERT INTO #tmp VALUES ('John','Smith',NULL);INSERT INTO #tmp VALUES ('Sunita','Beck', '');INSERT INTO #tmp VALUES ('Jane','Doe','W');SELECT firstname + ' ' + ISNULL(nullif(middleinitial,'')+'.','') + lastnameFROM #tmp;DROP TABLE #tmp;If this will do it, easy enough to make that into a function, but it is so short that you may even want to just keep it in-line.