I have a address in more than one column in a table.
SELECT FirstName, LastName, StreetAddress, City, Country, PostalCode
FROM Client
I a
Another solution is to use ISNULL
Select FirstName, LastName
, ISNULL(StreetAddress+', ','')
+ISNULL(City+', ','')
+ISNULL(Country+', ','')
+ISNULL(PostalCode,'')
FROM Client
If a value is null, then the concatenation result will be null. ISNULL will replace the first expression with the second expression.
http://msdn.microsoft.com/en-us/library/ms184325(v=SQL.90).aspx