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
 Transact-SQL (2000)
 Case statement

Author  Topic 

berengar
Starting Member

21 Posts

Posted - 2006-06-28 : 09:07:50
Why wont a simple case statement to replace
NULL values like this :

WHEN NULL THEN ''
ELSE ct_dept
END as 'Department',

------------
why is this not working and still returning the null values , instead
of blank spaces ?

nr
SQLTeam MVY

12543 Posts

Posted - 2006-06-28 : 09:09:20
when null
is the equivalent of
= null
which returns null which is interpreted as false

you need
case when x is null then
else
end

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-28 : 09:10:39
Can you post some sample data?

Try also

Select ISNULL(column,'') from yourTable

Madhivanan

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

- Advertisement -