Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Select CASE ret...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 11004 of 11221
Post > Topic >>

Select CASE returning NULL value

by "sbowman@[EMAIL PROTECTED] " <sbowman@[EMAIL PROTECTED] > Apr 26, 2008 at 08:34 AM

I have the following CASE statement in a view:

(SELECT CASE
WHEN ISNULL([dbo].[tblContact].[JobTitleID], NULL) = NULL
THEN [dbo].[f_ContactNameFL]([dbo].[tblContact].[ContactID])
ELSE [dbo].[f_ContactNameFL]([dbo].[tblContact].[ContactID]) + ', ' +
[dbo].[tlkpJobTitle].[Title]
END) AS ContactNameAndTitle

It works perfectly when dbo.tblContact.JobTitleID is NOT null. When it
is null it should return a contact name but it is returning null. The
problem is not f_ContactNameFL. There is another column in the same
view that uses that function and it works perfectly. What am I doing
wrong?

Thanks,
Shelley
 




 2 Posts in Topic:
Select CASE returning NULL value
"sbowman@[EMAIL PROT  2008-04-26 08:34:44 
Re: Select CASE returning NULL value
"Plamen Ratchev"  2008-04-26 13:44:28 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Wed Jul 9 0:42:01 CDT 2008.