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
 General SQL Server Forums
 New to SQL Server Programming
 isnull function

Author  Topic 

maya_zakry
Constraint Violating Yak Guru

379 Posts

Posted - 2006-12-29 : 21:27:29
okay, using isnull function we could replace null value..
but i want to do opposite, i want to replace if it's NOT null..
i tried notisnull also cannot..

Note : this is for select statement
SELECT isnull(d.ClientID,'-') FROM blabla

How to replace something if it's not null
SELECT isNOTnull(d.ClientID, '-')

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-12-29 : 22:45:15
select case when d.ClientId is not null then '-' else null end from blabla

Corey

Co-worker on children "...when I have children, I'm going to beat them. Not because their bad, but becuase I think it would be fun ..."
Go to Top of Page
   

- Advertisement -