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.
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)SLECTCASE 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 ClauseWHERE (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) |
 |
|
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" |
 |
|
|
|
|