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 2008 Forums
 SQL Server Administration (2008)
 Derived Column Expression problem

Author  Topic 

masterdineen
Aged Yak Warrior

550 Posts

Posted - 2011-01-17 : 09:45:43
I have a column with the following expression

(ISNULL(STATUS_DATE) && ISNULL(FEEPAYER) && FEEPAYER == "N" && FEEPAYER == " ") && (FEEPAYER == "Y") ? 0 : 1

But it is not returning the desired results.

i want to return 0 if

Status_Data is NULL, Feepayer is NULL, Feepayer = N, FEEPAYER is empty

I want to return 1 if

FEEPAYER = Y

can someone tell me where i am going wrong please


MCTS / MCITP certified

masterdineen
Aged Yak Warrior

550 Posts

Posted - 2011-01-17 : 11:43:57
Does anyone know where i can get some good examples on the web?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-01-17 : 12:01:55
Dupe: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=155327
Go to Top of Page
   

- Advertisement -