Thursday, March 29, 2012

Do not Display "NULL" in Results tab

Is there a setting in Management Studio to NOT display "NULL" in the
Results tab for either Grid or Text view? I didn't see anything under
Options. I'm currently having to do search and replace to remove it
before passing on to users or using for imports to other apps. Third
party import programs typically treat this as text.
MarkChange the query to say COALESCE(stringValue, '')
"Mark" <mytrash9_NOSPAM@.bellsouth.net> wrote in message
news:u86aa2hhs69fdhun44e1cd5ihrio5fne07@.
4ax.com...
> Is there a setting in Management Studio to NOT display "NULL" in the
> Results tab for either Grid or Text view? I didn't see anything under
> Options. I'm currently having to do search and replace to remove it
> before passing on to users or using for imports to other apps. Third
> party import programs typically treat this as text.
>
> Mark|||This is what I was afraid of. It seems for every two steps forward in
Management Studio, you have to take one step back. So now if I have
100 varchar columns, I'll have to create 100 alias columns
(ISNULL(ColName, '') AS ColName). I just don't understand why MS can't
carry over features in previous versions to the next. It seems they
could have added an option to "Query Results" to display NULL or blank
for the output. This wasn't a problem in QA.
On Fri, 30 Jun 2006 08:45:49 -0400, "Aaron Bertrand [SQL Server MVP]"
<ten.xoc@.dnartreb.noraa> wrote:

>Change the query to say COALESCE(stringValue, '')
>"Mark" <mytrash9_NOSPAM@.bellsouth.net> wrote in message
> news:u86aa2hhs69fdhun44e1cd5ihrio5fne07@.
4ax.com...
>|||> (ISNULL(ColName, '') AS ColName). I just don't understand why MS can't
> carry over features in previous versions to the next. It seems they
> could have added an option to "Query Results" to display NULL or blank
> for the output. This wasn't a problem in QA.
It's quite possible that they got a lot of complaints about that
"feature"... to me, at least, there is a big difference between NULL and
blank. If I can't visibly tell the difference, I'm going to have to change
something.
It's kind of like a car manufacturer choosing to put the cup holder on the
dash or in the center console. No matter which option they choose, they're
going to piss someone off.
A

No comments:

Post a Comment