SQL Replace Nulls With Blank String

Simple way to replace NULL values in your queries with blank strings by using the IsNull function.

This will allow for problem free string creation etc.

1
2
3
SELECT IsNull(ColumnName, '') 
As NewColumnName 
FROM TableName

More information can be found here: http://msdn.microsoft.com/en-us/library/ms184325.aspx

Leave a Reply