CHAR and VARCHAR fields can use ISNULL(column_name, value_for_nulls)
Code:
SELECT ISNULL(name_of_somethng, ' ') AS "name_of_something"
FROM MyTable
With numbers it would be necessary to CAST the number as VARCHAR in order to use blanks in place of NULLS.
Code:
SELECT ISNULL(CAST(number_of_thngs AS VARCHAR), ' ') AS "number_of_things"
FROM MyTable
I think that will work. I am uncertain what the result of CASTing a NULL might be, having never done that. But I am pretty sure you wont be able to have an expression that sometimes evaluates to numbers and other times evaluates to a string.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.