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)
 Can't See the NULL Values

Author  Topic 

callawayx14
Yak Posting Veteran

73 Posts

Posted - 2008-02-28 : 13:12:33
I'm trying to run the query below. There are 4 values in the "dbo.Request_Won_Lost.Won_Lost_Code" field (W,L,NULL,T)

SLECT
CASE dbo.Request_Won_Lost.Won_Lost_Code WHEN 'T' THEN 'Tentative'
WHEN NULL THEN 'N'
ELSE 'Other' END AS [Value]

It does not dislpay the NULL's.

My where Clause

WHERE (dbo.Request_Won_Lost.Won_Lost_Code NOT IN ('W', 'L'))

Any help would be greatly appreciated

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-28 : 13:35:48
Change like this & try:-
WHERE (dbo.Request_Won_Lost.Won_Lost_Code NOT IN ('W', 'L') OR dbo.Request_Won_Lost.Won_Lost_Code IS NULL)

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-28 : 16:06:16
[code]SELECT CASE
WHEN dbo.Request_Won_Lost.Won_Lost_Code = 'T' THEN 'Tentative'
WHEN dbo.Request_Won_Lost.Won_Lost_Code IS NULL THEN 'N'
ELSE 'Other'
END AS [Value][/code]


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -