Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to show a null string value if there is no val

Author  Topic 

reddymade
Posting Yak Master

165 Posts

Posted - 2006-02-10 : 17:35:59
I use the following is select query's if there is no value then show ""
rtrim(isnull(StringColumnName,''))

Can you please tell me how can i show the "" empty null value if there is no date.
i a using the following for date: i would like to also add if there is no date then show null:

CONVERT(varchar(10),DateColumn,101)

Thank you very much for the information.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-02-10 : 17:45:23
I'm confused what you mean by empty NULL. Do you want a NULL returned or the empty string? If NULL, then use ISNULL. If empty string, then use CASE statement.

Tara Kizer
aka tduggan
Go to Top of Page

reddymade
Posting Yak Master

165 Posts

Posted - 2006-02-10 : 17:52:37
Thanks, After i created the post i did changed using isnull, it works.

quote:
Originally posted by tkizer

I'm confused what you mean by empty NULL. Do you want a NULL returned or the empty string? If NULL, then use ISNULL. If empty string, then use CASE statement.

Tara Kizer
aka tduggan

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-13 : 02:00:42
or COALESCE(col,'')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -