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 2005 Forums
 Transact-SQL (2005)
 additional check in CASE

Author  Topic 

magmo
Aged Yak Warrior

558 Posts

Posted - 2009-01-15 : 10:10:26
Hi

I have this code..
CASE WHEN dbo.tbl_Error.Attachment IS NULL THEN 0 ELSE 1 END AS AttachmentStatus

But I need to also check that the Attachment column is <> ''

How do I add that to this code?

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-01-15 : 10:16:08
CASE WHEN dbo.tbl_Error.Attachment IS NULL and [Attachment column] <> '' THEN 0 ELSE 1 END AS AttachmentStatus
Go to Top of Page

magmo
Aged Yak Warrior

558 Posts

Posted - 2009-01-15 : 10:18:57
Excellent, Thanks!
Go to Top of Page
   

- Advertisement -